fix user edit bug, allow to delete users from the database (#40)

This commit is contained in:
Christoph Haas
2022-03-15 23:34:55 +01:00
parent cc50fcf8e6
commit 83271b5d34
7 changed files with 73 additions and 27 deletions

View File

@@ -76,6 +76,11 @@
<button type="submit" class="btn btn-primary">Save</button>
<a href="/admin/users/" class="btn btn-secondary">Cancel</a>
{{if eq $.Session.IsAdmin true}}
{{if eq .User.Source "db"}}
<a href="/admin/users/delete?pkey={{.User.Email}}" data-toggle="confirmation" data-title="Really delete user and associated peers?" title="Delete user and associated peers" class="btn btn-danger float-right">Delete</a>
{{end}}
{{end}}
</form>
</div>
{{template "prt_footer.html" .}}