mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
permission-find no longer crashes with --targetgroup
Target Group parameter was not processed correctly which caused permission-find to always crash when this search parameter was used. Fix the crash and create a unit test case to avoid future regression. https://fedorahosted.org/freeipa/ticket/3335
This commit is contained in:
@@ -815,8 +815,9 @@ class aci_find(crud.Search):
|
||||
found = False
|
||||
if 'target' in a.target:
|
||||
target = a.target['target']['expression']
|
||||
if api.env.container_group in target:
|
||||
targetdn = DN(target.replace('ldap:///',''))
|
||||
targetdn = DN(target.replace('ldap:///',''))
|
||||
group_container_dn = DN(api.env.container_group, api.env.basedn)
|
||||
if targetdn.endswith(group_container_dn):
|
||||
try:
|
||||
cn = targetdn[0]['cn']
|
||||
except (IndexError, KeyError):
|
||||
|
||||
Reference in New Issue
Block a user