diff --git a/lib/import/otrs/user.rb b/lib/import/otrs/user.rb index e6b2f2ecd..be086603c 100644 --- a/lib/import/otrs/user.rb +++ b/lib/import/otrs/user.rb @@ -96,6 +96,7 @@ module Import queues.each do |queue| permissions = user['GroupIDs'][ queue['GroupID'] ] + permissions ||= user['GroupIDs'][ queue['GroupID'].to_s ] next if !permissions next if !permissions.include?('rw') @@ -144,6 +145,7 @@ module Import def groups_from_otrs_group(role_object, group) result = [] + return result if role_object.blank? return result if role_object['GroupIDs'].blank? permissions = role_object['GroupIDs'][ group['ID'] ] @@ -165,7 +167,7 @@ module Import roles = Import::OTRS::Requester.load('Role') roles.each do |role| next if !user['RoleIDs'].include?(role['ID']) - result += groups_from_otrs_groups(role['GroupIDs']) + result += groups_from_otrs_groups(role) end result end