mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-09-03 20:52:56 -05:00
Check if the group exists
When setting default group, we should check if the group exists. If not, it could lead to some issues with adding new users after the new default group is set. https://fedorahosted.org/freeipa/ticket/504
This commit is contained in:
committed by
Rob Crittenden
parent
9a5d4f2e18
commit
19049d1a64
@@ -149,6 +149,12 @@ class config_mod(LDAPUpdate):
|
||||
entry_attrs['ipamigrationenabled'] = 'TRUE'
|
||||
else:
|
||||
entry_attrs['ipamigrationenabled'] = 'FALSE'
|
||||
if 'ipadefaultprimarygroup' in entry_attrs:
|
||||
group=entry_attrs['ipadefaultprimarygroup']
|
||||
try:
|
||||
api.Command['group_show'](group)
|
||||
except errors.NotFound:
|
||||
raise errors.NotFound(message=unicode("The group doesn't exist"))
|
||||
return dn
|
||||
|
||||
api.register(config_mod)
|
||||
|
||||
Reference in New Issue
Block a user