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:
2026-02-18 09:01:52 +02:00
parent 9193f2a7b1
commit 0c9494da56
5 changed files with 183 additions and 18 deletions

View File

@@ -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>