mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
* Added block for page_title as title fragment * Add permissions auditing tool * Added tests for permissions audit tool * Added documentation for permissions tool * Add permissions tool to coverage
21 lines
612 B
Python
21 lines
612 B
Python
from services.hooks import MenuItemHook
|
|
from alliance_auth import hooks
|
|
|
|
|
|
class PermissionsTool(MenuItemHook):
|
|
def __init__(self):
|
|
MenuItemHook.__init__(self,
|
|
'Permissions Audit',
|
|
'fa fa-key fa-id-card grayiconecolor',
|
|
'permissions_overview', 400)
|
|
|
|
def render(self, request):
|
|
if request.user.has_perm('permissions_tool.audit_permissions'):
|
|
return MenuItemHook.render(self, request)
|
|
return ''
|
|
|
|
|
|
@hooks.register('menu_util_hook')
|
|
def register_menu():
|
|
return PermissionsTool()
|