feat: Implement user and role management with repositories
- Added RoleRepository and UserRepository for managing roles and users. - Implemented methods for creating, retrieving, and assigning roles to users. - Introduced functions to ensure default roles and an admin user exist in the system. - Updated UnitOfWork to include user and role repositories. - Created new security module for password hashing and JWT token management. - Added tests for authentication flows, including registration, login, and password reset. - Enhanced HTML templates for user registration, login, and password management with error handling. - Added a logo image to the static assets.
This commit is contained in:
36
templates/reset_password.html
Normal file
36
templates/reset_password.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% extends "base.html" %} {% block title %}Reset Password{% endblock %} {% block
|
||||
content %}
|
||||
<div class="container">
|
||||
<h1>Reset Password</h1>
|
||||
{% if errors %}
|
||||
<div class="alert alert-error">
|
||||
<ul>
|
||||
{% for error in errors %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form id="reset-password-form" method="post" action="{{ form_action }}">
|
||||
<input type="hidden" name="token" value="{{ token | default('') }}" />
|
||||
<div class="form-group">
|
||||
<label for="password">New Password:</label>
|
||||
<input type="password" id="password" name="password" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="confirm_password">Confirm Password:</label>
|
||||
<input
|
||||
type="password"
|
||||
id="confirm_password"
|
||||
name="confirm_password"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<button type="submit">Update Password</button>
|
||||
</form>
|
||||
<p>
|
||||
Remembered your password?
|
||||
<a href="{{ request.url_for('auth.login_form') }}">Return to login</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user