mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 14:27:42 -02:30
sso/backends: remove_* must not change the user (#13430)
_update_m2m_from_groups must return None if remove_* is false or empty, because None indicates that the user permissions will not be changed. related #13429
This commit is contained in:
@@ -354,7 +354,9 @@ def _update_m2m_from_groups(ldap_user, opts, remove=True):
|
|||||||
continue
|
continue
|
||||||
if ldap_user._get_groups().is_member_of(group_dn):
|
if ldap_user._get_groups().is_member_of(group_dn):
|
||||||
return True
|
return True
|
||||||
return False
|
if remove:
|
||||||
|
return False
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
@receiver(populate_user, dispatch_uid='populate-ldap-user')
|
@receiver(populate_user, dispatch_uid='populate-ldap-user')
|
||||||
|
|||||||
Reference in New Issue
Block a user