Skip to content
Snippets Groups Projects
Commit daf02adb authored by Branson Craig Stephens's avatar Branson Craig Stephens
Browse files

Fixed bug where users are removed from admin managed groups if the group name...

Fixed bug where users are removed from admin managed groups if the group name is not in the shib session.
parent 500a8801
No related branches found
No related tags found
No related merge requests found
......@@ -133,6 +133,8 @@ class LigoAuthMiddleware:
pass
# If the user has lost a group membership, remove it.
for group_name in stored_user_group_names - user_group_names:
if group_name in settings.ADMIN_MANAGED_GROUPS:
continue
try:
g = Group.objects.get(name=group_name)
g.user_set.remove(user)
......
......@@ -60,6 +60,8 @@ VOEVENT_FAR_FLOOR = 3.17e-10
# EM Advocate Group name
EM_ADVOCATE_GROUP = 'em_advocates'
ADMIN_MANAGED_GROUPS = [EM_ADVOCATE_GROUP, 'executives',]
# 11/18/14. No longer checking XMPP_ALERT_CHANNELS. This is not necessary.
# If someone sends out an event, an alert should go out. Listerers have the
# option to unsubscribe from nodes if so desired.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment