Rename Auditable group.

Its better to be explicit.
This commit is contained in:
colcrunch 2018-07-22 20:08:16 -04:00
parent 1730bc3b98
commit 5b8983deac
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ class GroupManager:
return not group.authgroup.internal return not group.authgroup.internal
@staticmethod @staticmethod
def auditable_group(group): def check_internal_group(group):
""" """
Check if a group is auditable, i.e not an internal group Check if a group is auditable, i.e not an internal group
:param group: django.contrib.auth.models.Group object :param group: django.contrib.auth.models.Group object

View File

@ -74,7 +74,7 @@ def group_membership_audit(request, group_id):
# Check its a joinable group i.e. not corp or internal # Check its a joinable group i.e. not corp or internal
# And the user has permission to manage it # And the user has permission to manage it
if not GroupManager.auditable_group(group) or not GroupManager.can_manage_group(request.user, group): if not GroupManager.check_internal_group(group) or not GroupManager.can_manage_group(request.user, group):
logger.warning("User %s attempted to view the membership of group %s but permission was denied" % logger.warning("User %s attempted to view the membership of group %s but permission was denied" %
(request.user, group_id)) (request.user, group_id))
raise PermissionDenied raise PermissionDenied