aboutsummaryrefslogtreecommitdiff
path: root/app/templates/users
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-05-21 22:31:50 +0100
committerrubenwardy <rw@rubenwardy.com>2018-05-21 22:31:50 +0100
commit4841c66602b0fdc35a78d6335583fd1d8f3e1dad (patch)
tree0bc553ae0a0030ea16f799d3d23c8a057144d529 /app/templates/users
parent0a72a38dd0fa380afa85d8176ccf0ed60d7d237d (diff)
downloadcheatdb-4841c66602b0fdc35a78d6335583fd1d8f3e1dad.tar.xz
Restrict changing display name to moderator and above
Diffstat (limited to 'app/templates/users')
-rw-r--r--app/templates/users/user_profile_page.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/templates/users/user_profile_page.html b/app/templates/users/user_profile_page.html
index 53afd57..e4f9ff0 100644
--- a/app/templates/users/user_profile_page.html
+++ b/app/templates/users/user_profile_page.html
@@ -7,7 +7,7 @@
{% block content %}
<div class="box box_grey">
- <h2>{{ user.username }}</h2>
+ <h2>{{ user.display_name }}</h2>
<table>
<tr>
@@ -73,7 +73,9 @@
<div class="col-sm-6 col-md-5 col-lg-4">
{{ form.hidden_tag() }}
- {{ render_field(form.display_name, tabindex=230) }}
+ {% if user.checkPerm(current_user, "CHANGE_DNAME") %}
+ {{ render_field(form.display_name, tabindex=230) }}
+ {% endif %}
{% if user.checkPerm(current_user, "CHANGE_EMAIL") %}
{{ render_field(form.email, tabindex=240) }}