53 lines
1.2 KiB
HTML
53 lines
1.2 KiB
HTML
{{template "header" .}}
|
|
{{template "navbar" .}}
|
|
|
|
<div class="container">
|
|
{{if not .IsSuperUser}}
|
|
<div class="alert alert-err">403 Forbidden</div>
|
|
{{else}}
|
|
<h2>Users</h2>
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<div class="card">
|
|
<div class="card-header">Users</div>
|
|
<div class="card-b">
|
|
{{template "alarm" .}}
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr><th>ID</th><th>Login</th><th>Display Name</th><th>Super User</th><th>Reset Password</th><th>Sessions</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Users}}
|
|
<tr>
|
|
<td>{{.Id}}</td>
|
|
<td>{{.Login}}</td>
|
|
<td>{{.EffectiveDisplayName}}</td>
|
|
<td>{{if .SuperUser}}Yes{{else}}No{{end}}</td>
|
|
<td>
|
|
<form method="post" action="/users/reset-password" style="display:inline;">
|
|
{{template "csrf" $}}
|
|
<input type="hidden" name="user_id" value="{{.Id}}">
|
|
<input type="password" name="new_password" placeholder="New password" required minlength="6">
|
|
<button type="submit">Reset</button>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form method="post" action="/users/end-sessions" style="display:inline;">
|
|
{{template "csrf" $}}
|
|
<input type="hidden" name="user_id" value="{{.Id}}">
|
|
<button type="submit">End Sessions</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
|
|
{{template "footer" .}} |