mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
Inconsistent error message for ipa group-detach
When attempting to detach a private group that doesn't exist, the error message returned is not consistent with the error returned by the other topic commands. This patch adds a standard message. https://fedorahosted.org/freeipa/ticket/291
This commit is contained in:
parent
a686f36906
commit
c9ff669cdd
@ -294,7 +294,10 @@ class group_detach(LDAPQuery):
|
||||
group_dn = self.obj.get_dn(*keys, **options)
|
||||
user_dn = self.api.Object['user'].get_dn(*keys)
|
||||
|
||||
(user_dn, user_attrs) = ldap.get_entry(user_dn)
|
||||
try:
|
||||
(user_dn, user_attrs) = ldap.get_entry(user_dn)
|
||||
except errors.NotFound:
|
||||
self.obj.handle_not_found(*keys)
|
||||
is_managed = self.obj.has_objectclass(user_attrs['objectclass'], 'mepmanagedentry')
|
||||
if (not ldap.can_write(user_dn, "objectclass") or
|
||||
not (ldap.can_write(user_dn, "mepManagedEntry")) and is_managed):
|
||||
|
Loading…
Reference in New Issue
Block a user