mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-13 22:32:15 +00:00
Now kill all access if set is_active = False
This commit is contained in:
@@ -67,7 +67,7 @@ def update_user_access(user, **kwargs):
|
||||
servacc.active = 0
|
||||
servacc.save()
|
||||
pass
|
||||
|
||||
else:
|
||||
# For each of the user's services, check they're in a valid group for it and enable/disable as needed.
|
||||
for servacc in ServiceAccount.objects.filter(user=user):
|
||||
if not (set(user.groups.all()) & set(servacc.service.groups.all())):
|
||||
|
||||
Reference in New Issue
Block a user