From b1f58e5441eeb371a55d1f54d4f33bdf65a1c2f1 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 14 Apr 2008 20:13:44 -0400 Subject: 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 --- ipa-server/xmlrpc-server/funcs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit