Don't quit trying to lock a user if they aren't in the activated group.

Users are considered activated by default so don't need to be in the
activated group explicitly. Ignore the "not in group" error when trying
to remove them.

442470
This commit is contained in:
Rob Crittenden 2008-04-14 20:13:44 -04:00
parent ff3ca61f73
commit b1f58e5441

View File

@ -1113,7 +1113,11 @@ class IPAServer:
# First see if they are in the activated group as this will override
# the our inactivation.
group = self.get_entry_by_cn("activated", None, opts)
try:
self.remove_member_from_group(dn, group.get('dn'), opts)
except ipaerror.exception_for(ipaerror.STATUS_NOT_GROUP_MEMBER):
# this is fine, they may not be explicitly in this group
pass
# Now add them to inactivated
group = self.get_entry_by_cn("inactivated", None, opts)