зеркало из https://github.com/mozilla/mozillians.git
Merge pull request #3868 from akatsoulas/fix-access-group-removal
Remove all access groups if user in not in NDAs.
This commit is contained in:
Коммит
1d2bacf8e2
|
@ -390,7 +390,8 @@ class Group(GroupBase):
|
|||
send_email = True
|
||||
# Remove all the access groups the user is a member of
|
||||
# if the group to remove is the NDA
|
||||
if self.name in settings.NDA_ACCESS_GROUPS:
|
||||
if not GroupMembership.objects.filter(userprofile=userprofile,
|
||||
group__name__in=settings.NDA_ACCESS_GROUPS):
|
||||
group_memberships = GroupMembership.objects.none()
|
||||
# If the user is not staff, we need to delete the memberships to any access group
|
||||
if not userprofile.can_create_access_groups:
|
||||
|
|
Загрузка…
Ссылка в новой задаче