pws reset
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<div class="actions"><a href="/admin">← Admin panel</a></div>
|
||||
</section>
|
||||
|
||||
{% if page.updated %}<p class="notice">Authorization updated. The current session remains valid and all subsequent requests use the new policy.</p>{% endif %}
|
||||
{% if page.updated %}<p class="notice">Administration updated. The current session remains valid and all subsequent requests use the new state.</p>{% endif %}
|
||||
|
||||
{% if page.can_manage_roles %}
|
||||
<section class="panel">
|
||||
@@ -84,7 +84,7 @@
|
||||
<section class="panel">
|
||||
<h2>Users</h2>
|
||||
<table class="builder-table">
|
||||
<thead><tr><th>Username</th><th>Email</th><th>Current role</th><th>Assign role</th></tr></thead>
|
||||
<thead><tr><th>Username</th><th>Email</th><th>Current role</th><th>Assign role</th><th>Reset password</th></tr></thead>
|
||||
<tbody>{% for user in page.users %}<tr>
|
||||
<td>{{ user.username }}</td><td>{{ user.email }}</td><td>{{ user.role }}</td>
|
||||
<td><form hx-post="/admin/permissions/users/role" hx-target="#permission-status" class="actions">
|
||||
@@ -92,6 +92,12 @@
|
||||
<select name="role">{% for role in page.assignable_roles() %}<option value="{{ role.name }}" {% if user.role == role.name %}selected{% endif %}>{{ role.name }}</option>{% endfor %}</select>
|
||||
<button type="submit">Assign</button>
|
||||
</form></td>
|
||||
<td>{% if page.can_reset_password(user) %}<form hx-post="/admin/permissions/users/password" hx-target="#permission-status" class="actions">
|
||||
<input type="hidden" name="username" value="{{ user.username }}">
|
||||
<input name="new_password" type="password" autocomplete="new-password" placeholder="New password" required>
|
||||
<input name="new_password_confirmation" type="password" autocomplete="new-password" placeholder="Confirm password" required>
|
||||
<button type="submit">Reset</button>
|
||||
</form>{% endif %}</td>
|
||||
</tr>{% endfor %}</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user