forked from MarseyWorld/MarseyWorld
check current user's admin level not the victim's
parent
5e821add4a
commit
7fa874fd84
|
@ -224,7 +224,7 @@
|
||||||
{% if v.admin_level >= PERMS['ADMIN_REMOVE'] %}
|
{% if v.admin_level >= PERMS['ADMIN_REMOVE'] %}
|
||||||
<a id="unadmin" class="{% if u.admin_level < PERMS['ADMIN_ADD_PERM_LEVEL'] %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast(this,'/@{{u.username}}/remove_admin','admin','unadmin','d-none')">Remove admin</a>
|
<a id="unadmin" class="{% if u.admin_level < PERMS['ADMIN_ADD_PERM_LEVEL'] %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast(this,'/@{{u.username}}/remove_admin','admin','unadmin','d-none')">Remove admin</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if u.admin_level >= PERMS['ADMIN_ACTIONS_REVERT'] %}
|
{% if v.admin_level >= PERMS['ADMIN_ACTIONS_REVERT'] %}
|
||||||
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -597,7 +597,7 @@
|
||||||
<a id="unadmin2" class="{% if u.admin_level < PERMS['ADMIN_ADD_PERM_LEVEL'] %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast(this,'/@{{u.username}}/remove_admin','admin2','unadmin2','d-none')">Remove admin</a>
|
<a id="unadmin2" class="{% if u.admin_level < PERMS['ADMIN_ADD_PERM_LEVEL'] %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast(this,'/@{{u.username}}/remove_admin','admin2','unadmin2','d-none')">Remove admin</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if u.admin_level >= PERMS['ADMIN_ACTIONS_REVERT'] %}
|
{% if v.admin_level >= PERMS['ADMIN_ACTIONS_REVERT'] %}
|
||||||
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue