summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcrit@rhel1.greyoak.com>2008-04-14 20:13:44 -0400
committerRob Crittenden <rcrit@rhel1.greyoak.com>2008-04-14 23:13:58 -0400
commitb1f58e5441eeb371a55d1f54d4f33bdf65a1c2f1 (patch)
tree27935be8e890380af95c51d7c05c24f529f0b067
parentff3ca61f73d8df244dbd4e6b31fcec3cbfc28097 (diff)
downloadfreeipa-b1f58e5441eeb371a55d1f54d4f33bdf65a1c2f1.tar.gz
freeipa-b1f58e5441eeb371a55d1f54d4f33bdf65a1c2f1.tar.xz
freeipa-b1f58e5441eeb371a55d1f54d4f33bdf65a1c2f1.zip
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
-rw-r--r--ipa-server/xmlrpc-server/funcs.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ipa-server/xmlrpc-server/funcs.py b/ipa-server/xmlrpc-server/funcs.py
index b28030c78..b68fa3aeb 100644
--- a/ipa-server/xmlrpc-server/funcs.py
+++ b/ipa-server/xmlrpc-server/funcs.py
@@ -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)
- self.remove_member_from_group(dn, group.get('dn'), 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)