Files
notifications-admin/app/templates/views/user-profile/suppress-platform-admin.html
Leo Hemsted 7b02cb72c6 add option to suppress platform admin temporarily
so that platform admins (us) can view pages as regular users do easily.
Simply adds a flag in the session cookie that overrides the actual
platform admin flag on the user model if set. This way it's safe, since
this only downgrades existing functionality, so if someone managed to
alter it they could only get less permissions, not more.

You can change this value from the user profile page if either:

* you're a platform admin
* the flag is set (to any value) on the cookie.

This slightly weird check means that we don't check the underlying
`user._platform_admin` flag anywhere in the code, even when toggling
the suppression.
2019-06-14 11:59:12 +01:00

28 lines
703 B
HTML

{% extends "withoutnav_template.html" %}
{% from "components/form.html" import form_wrapper %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/page-header.html" import page_header %}
{% from "components/radios.html" import radios %}
{% block per_page_title %}
Suppress platform admin view
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-five-sixths">
{{ page_header(
'Suppress platform admin',
back_link=url_for('.user_profile')
) }}
{% call form_wrapper() %}
{{ radios(form.enabled) }}
{{ page_footer('Save') }}
{% endcall %}
</div>
</div>
{% endblock %}