mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 08:28:15 -04:00
dont use has_permissions to check for platform admins
platform_admin is a separate concept to permissions, so by removing the checks for it from the current_user.has_permissions function, we can simplify things greatly. We already record on the user whether they're a platform admin anyway.
This commit is contained in:
@@ -328,7 +328,7 @@ def add_service_template(service_id, template_type):
|
||||
|
||||
|
||||
def abort_403_if_not_admin_user():
|
||||
if not current_user.has_permissions(admin_override=True):
|
||||
if not current_user.platform_admin:
|
||||
abort(403)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user