mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 22:28:25 -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:
@@ -44,7 +44,7 @@
|
||||
{% if current_user.is_authenticated %}
|
||||
<li><a href="{{ url_for('main.documentation') }}">Documentation</a></li>
|
||||
<li><a href="{{ url_for('main.user_profile') }}">{{ current_user.name }}</a></li>
|
||||
{% if current_user.has_permissions(admin_override=True) %}
|
||||
{% if current_user.platform_admin %}
|
||||
<li><a href="{{ url_for('main.platform_admin') }}">Platform admin</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{{ url_for('main.sign_out')}}">Sign out</a></li>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<nav class="navigation">
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.organisation_dashboard', org_id=current_org.id) }}">Dashboard</a></li>
|
||||
{% if current_user.has_permissions(admin_override=True) %}
|
||||
<li><a href="{{ url_for('.manage_org_users', org_id=current_org.id) }}">Team members</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{{ url_for('.manage_org_users', org_id=current_org.id) }}">Team members</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{{ textbox(form.name, width='1-1', hint='Your recipients won’t see this', rows=10) }}
|
||||
{{ textbox(form.subject, width='1-1', highlight_tags=True, rows=2) }}
|
||||
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=8) }}
|
||||
{% if current_user.has_permissions(admin_override=True) %}
|
||||
{% if current_user.platform_admin %}
|
||||
{{ radios(form.process_type) }}
|
||||
{% endif %}
|
||||
{{ page_footer(
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="column-two-thirds">
|
||||
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=5) }}
|
||||
{% if current_user.has_permissions(admin_override=True) %}
|
||||
{% if current_user.platform_admin %}
|
||||
{{ radios(form.process_type) }}
|
||||
{% endif %}
|
||||
{{ page_footer(
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if current_user.has_permissions(admin_override=True) %}
|
||||
{% if current_user.platform_admin %}
|
||||
|
||||
<h2 class="heading-medium">Platform admin settings</h2>
|
||||
{% call mapping_table(
|
||||
|
||||
Reference in New Issue
Block a user