diff --git a/lib/import/otrs/user.rb b/lib/import/otrs/user.rb index 007ed1030..2ff06d478 100644 --- a/lib/import/otrs/user.rb +++ b/lib/import/otrs/user.rb @@ -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) diff --git a/spec/import/otrs/user_spec.rb b/spec/import/otrs/user_spec.rb index 478821e26..aa75c3e49 100644 --- a/spec/import/otrs/user_spec.rb +++ b/spec/import/otrs/user_spec.rb @@ -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',