Merge branch 'develop' of git.znuny.com:zammad/zammad into develop
This commit is contained in:
commit
27265b0596
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue