88 lines
2.3 KiB
HTML
88 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Buckler</title>
|
|
<script>
|
|
var users_perms = {{ users_json|safe }};
|
|
</script>
|
|
<script type="text/javascript" src="/static/buckler.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/static/buckler.css">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<object id="logo" data="/static/buckler_icon.svg"></object>
|
|
<h1>Buckler</h1>
|
|
</header>
|
|
<main>
|
|
<section>
|
|
Available sites
|
|
<ul id="avail_sites">
|
|
{% for site in avail_sites %}
|
|
<li><a href="{{ site['url'] }}">{{ site['name'] }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</section>
|
|
{% if request['session']['admin'] %}
|
|
<section>
|
|
<table id="users">
|
|
<thead>
|
|
<tr>
|
|
<th>User</th>
|
|
{% for app in apps %}
|
|
<th>{{ app }}</th>
|
|
{% endfor %}
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for username, values in users.items() %}
|
|
<tr>
|
|
<td>{{ username }}</td>
|
|
{% for value in values %}
|
|
<td><input type="checkbox" onchange="perm_change(this.parentElement.parentElement)"{% if value %} checked{% endif %}></td>
|
|
{% endfor %}
|
|
<td><input type="submit"></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
{% endif %}
|
|
<section>
|
|
<form action="{{ request.app.router['change_password'].url_for() }}" method="post" enctype="application/x-www-form-urlencoded">
|
|
<label for="current_password">Current password</label>
|
|
<input id="current_password" name="current_password" type="password"><br>
|
|
<label for="new_password">New password</label>
|
|
<input id="new_password" name="new_password" type="password"><br>
|
|
<label for="verify_password">Verify password</label>
|
|
<input id="verify_password" name="verify_password" type="password"><br>
|
|
<input type="submit" value="Submit">
|
|
</form>
|
|
</section>
|
|
<section>
|
|
{% if fido2_keys %}
|
|
<table id="security_keys">
|
|
<thead>
|
|
<tr>
|
|
<th>Nick</th>
|
|
<th>Delete</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for key in fido2_keys %}
|
|
<tr>
|
|
<td>{{ key['nick'] }}</td>
|
|
<td><input type="checkbox"></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<span>No registered keys.</span>
|
|
{% endif %}
|
|
<br><a href="./add_key">Add key</a>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|