mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
parent
ff3ca61f73
commit
b1f58e5441
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user