check current user's admin level not the victim's

master
justcool393 2022-10-06 03:34:12 -07:00
parent 5e821add4a
commit 7fa874fd84
1 changed files with 2 additions and 2 deletions

View File

@ -224,7 +224,7 @@
{% 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>
{% 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>
{% endif %}
</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>
{% 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>
{% endif %}