aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/admin/user-form.html
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-07-06 18:07:22 +0100
committerDave Arter <davea@mysociety.org>2016-07-19 17:56:22 +0100
commit6afbfe45183412e35e8e846fd0d4a9d846c8644b (patch)
tree3f5cb6173c08a571811f0a31508b45acf31d69f7 /templates/web/base/admin/user-form.html
parent65545553b5171f1ef1d611ea93c38f138451fb31 (diff)
Use normal user authentication to control access to /admin
- Adds is_superuser flag to User - Logged-in user must be a superuser or have from_body set in order to access anything within /admin - has_permission_to on a superuser will always return true - Only superusers can create/grant superusers - New `createsuperuser` command for creating superusers
Diffstat (limited to 'templates/web/base/admin/user-form.html')
-rw-r--r--templates/web/base/admin/user-form.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/web/base/admin/user-form.html b/templates/web/base/admin/user-form.html
index d6456f3d9..2942494a7 100644
--- a/templates/web/base/admin/user-form.html
+++ b/templates/web/base/admin/user-form.html
@@ -55,6 +55,17 @@
[% loc('Flagged:') %] <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]>
</li>
+
+ [% IF c.user.is_superuser %]
+ <li>
+ <div class="admin-hint">
+ <p>
+ [% loc("Superusers have permission to perform <strong>all actions</strong> within the admin.") %]
+ </p>
+ </div>
+ [% loc('Superuser:') %] <input type="checkbox" id="is_superuser" name="is_superuser"[% user.is_superuser ? ' checked' : '' %]>
+ </li>
+ [% END %]
[% END %]
</ul>
<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" >