Restrict changing display name to moderator and above

This commit is contained in:
rubenwardy
2018-05-21 22:31:50 +01:00
parent 0a72a38dd0
commit 4841c66602
3 changed files with 10 additions and 5 deletions

View File

@@ -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) }}