Working on issue #368 - Working on wrong user data key fails correct sha2 password import.
This commit is contained in:
parent
1f0e48afad
commit
b63e98714c
2 changed files with 4 additions and 5 deletions
|
@ -15,7 +15,6 @@ module Import
|
|||
UserFirstname: :firstname,
|
||||
UserLastname: :lastname,
|
||||
UserLogin: :login,
|
||||
UserPw: :password,
|
||||
}.freeze
|
||||
|
||||
def initialize(user)
|
||||
|
@ -80,8 +79,8 @@ module Import
|
|||
end
|
||||
|
||||
def password(user)
|
||||
return if !user[:password]
|
||||
"{sha2}#{user[:password]}"
|
||||
return if !user['UserPw']
|
||||
"{sha2}#{user['UserPw']}"
|
||||
end
|
||||
|
||||
def group_ids(user)
|
||||
|
|
|
@ -74,7 +74,7 @@ RSpec.describe Import::OTRS::User do
|
|||
source: 'OTRS Import',
|
||||
role_ids: [2],
|
||||
group_ids: ['1'],
|
||||
password: '9faaba2ab242a99bbb6992e9424386375f6757c17e6484ae570f39d9cad9f28ea',
|
||||
password: '{sha2}9faaba2ab242a99bbb6992e9424386375f6757c17e6484ae570f39d9cad9f28ea',
|
||||
updated_at: '2014-04-28 10:53:18',
|
||||
created_at: '2014-04-28 10:53:18',
|
||||
id: '1',
|
||||
|
@ -107,7 +107,7 @@ RSpec.describe Import::OTRS::User do
|
|||
source: 'OTRS Import',
|
||||
role_ids: [2],
|
||||
group_ids: [],
|
||||
password: '9edb001ad7900daea0622d89225c9ca729749fd12ae5ea044f072d1b7c56c8cc',
|
||||
password: '{sha2}9edb001ad7900daea0622d89225c9ca729749fd12ae5ea044f072d1b7c56c8cc',
|
||||
updated_at: '2014-11-14 00:53:20',
|
||||
created_at: '2014-11-14 00:53:20',
|
||||
id: '6',
|
||||
|
|
Loading…
Reference in a new issue