add a way for mods to create a password reset link for users
This commit is contained in:
@ -37,6 +37,9 @@
|
||||
<th>Username</th>
|
||||
<th class="small">Permission</th>
|
||||
<th class="small">Signed up on</th>
|
||||
{% if active_user.is_admin() %}
|
||||
<th class="small">Create password reset link</th>
|
||||
{% endif %}
|
||||
</thead>
|
||||
{% for user in not_guests %}
|
||||
<tr>
|
||||
@ -50,6 +53,13 @@
|
||||
<td>
|
||||
{{ timestamp(user.created_at) }}
|
||||
</td>
|
||||
{% if active_user.is_admin() %}
|
||||
<td>
|
||||
<form method="post" action="{{url_for('mod.create_reset_pass', user_id=user.id)}}">
|
||||
<input type="submit" class="warn" value="Create password reset link">
|
||||
</form>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
15
app/templates/users/reset_link_login.html
Normal file
15
app/templates/users/reset_link_login.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Reset password{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg login-container">
|
||||
<h1>Reset password for {{username}}</h1>
|
||||
<p>Send this link to {{username}} to allow them to reset their password.</p>
|
||||
<form method="post">
|
||||
<label for="password">New password</label><br>
|
||||
<input type="password" id="password" name="password" autocomplete="new-password" pattern="(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])(?!.*\s).{10,}" title="10+ chars with: 1 uppercase, 1 lowercase, 1 number, 1 special char, and no spaces" required><br>
|
||||
<label for="password2">Confirm password</label><br>
|
||||
<input type="password" id="password2" name="password2" autocomplete="new-password" pattern="(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])(?!.*\s).{10,}" title="10+ chars with: 1 uppercase, 1 lowercase, 1 number, 1 special char, and no spaces" required><br>
|
||||
<input type="submit" value="Reset password">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user