Add health check endpoint and enhance admin verification logic
- Introduced a new public `/health` endpoint to verify database connectivity and list active admin users. - Updated `verify_admin` function to return the actual username on successful verification and handle various password hashing schemes, including legacy formats. - Modified login logic to use the returned username for session management. - Updated `login.html` form to support file uploads by adding `enctype` attribute.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="login-card">
|
||||
<h1>Admin login</h1>
|
||||
<p class="login-hint">Only users with role <code>admin</code> can access this dashboard.</p>
|
||||
<form method="post" action="{{ url_for('login') }}" class="login-form">
|
||||
<form method="post" action="{{ url_for('login') }}" class="login-form" enctype="multipart/form-data">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" name="username" required autofocus autocomplete="username">
|
||||
<label for="password">Password</label>
|
||||
|
||||
Reference in New Issue
Block a user