mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-14 23:10:15 +02:00
Rename Auditable group.
Its better to be explicit.
This commit is contained in:
parent
1730bc3b98
commit
5b8983deac
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user