Initial commit
This commit is contained in:
commit
c578b91c2d
46 files changed
+3241
No files matched your search
@@ -0,0 +1,53 @@
|
||||
{{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" .}}
|
||||
Reference in new issue
Block a user