Refactor admin panel: enhance user management and security features
- Added role-based access control for user management links in admin navigation. - Improved user account display with a dedicated account link. - Implemented form submission confirmation for delete actions in the admin interface. - Introduced a password visibility toggle on the login page. - Added login throttling to prevent brute-force attacks, recording failed attempts. - Created a CLI script for creating an admin user, replacing the previous hardcoded admin credentials. - Updated database schema to support login attempt tracking. - Enhanced user editing functionality, allowing role changes with restrictions. - Improved modal handling for user actions, ensuring better focus management. - Added styles for new account management page and improved modal transitions.
This commit is contained in:
1 parent
91ec95a4a9
commit
242c5165e1
21 files changed
+669
-77
No files matched your search
@@ -11,12 +11,19 @@
|
||||
padding: 1.5rem;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity .2s ease;
|
||||
// Closed modals must be visibility: hidden, not just transparent —
|
||||
// otherwise their fields stay focusable and Safari offers saved logins
|
||||
// for an invisible Username field. The visibility switch waits for the
|
||||
// fade-out to finish so the close animation still plays.
|
||||
visibility: hidden;
|
||||
transition: opacity .2s ease, visibility 0s linear .2s;
|
||||
}
|
||||
|
||||
.admin-modal-backdrop.is-open {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
visibility: visible;
|
||||
transition: opacity .2s ease, visibility 0s;
|
||||
}
|
||||
|
||||
.admin-modal {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/* ---------- admin: my account ---------- */
|
||||
/* One panel, fields in the shared two-column .form-grid (which already
|
||||
stacks below 47.5em). Capped so the fields don't stretch across the
|
||||
full dashboard width on large screens. */
|
||||
.account-panel {
|
||||
max-width: 56rem;
|
||||
}
|
||||
@@ -31,3 +31,4 @@
|
||||
@use "pages/admin-login";
|
||||
@use "pages/admin-menu";
|
||||
@use "pages/admin-hours";
|
||||
@use "pages/admin-account";
|
||||
Reference in new issue
Block a user