dont allow deleting admin

This commit is contained in:
sentriz
2020-03-10 17:47:57 +00:00
parent 25f310fcbb
commit f82d13d8e2
5 changed files with 457 additions and 349 deletions

View File

@@ -56,7 +56,12 @@
<span class="light">&#124;</span>
<a href="{{ printf "/admin/change_password?user=%s" $user.Name | path }}">change password</a>
<span class="light">&#124;</span>
<a href="{{ printf "/admin/delete_user?user=%s" $user.Name | path }}">delete</a><br/>
{{ if $user.IsAdmin }}
<span class="light">delete</span>
{{ else }}
<a href="{{ printf "/admin/delete_user?user=%s" $user.Name | path }}">delete</a>
{{ end }}
<br/>
{{ end }}
<a href="{{ path "/admin/create_user" }}" class="button">create new</a>
</div>