Fix group deletion

ticket 347
This commit is contained in:
Rob Crittenden 2010-10-08 22:44:48 -04:00 committed by Endi Sukma Dewata
parent 81c3898da4
commit 19272e5b8e

View File

@ -165,9 +165,10 @@ class group_del(LDAPDelete):
def_primary_group_dn = group_dn = self.obj.get_dn(def_primary_group)
if dn == def_primary_group_dn:
raise errors.DefaultGroup()
(group_dn, group_attrs) = self.obj.methods.show(
self.obj.get_primary_key_from_dn(dn)
)
group_attrs = self.obj.methods.show(
self.obj.get_primary_key_from_dn(dn), all=True
)['result']
if 'mepmanagedby' in group_attrs:
raise errors.ManagedGroupError()
return dn