Fix superadmin access control and modal aria-hidden warning

- Implement role normalization system to handle role name variants (superadmin, super_admin, administrator)
- Add session persistence configuration (PERMANENT_SESSION_LIFETIME = 7 days)
- Add modules JSON column to users database table schema
- Update setup script with backward compatibility check for modules column
- Fix user_management_simple route to properly fetch and display modules
- Resolve modal aria-hidden accessibility warning by managing focus on close button
- All changes deployed and tested successfully
This commit is contained in:
Quality App Developer
2025-12-26 20:08:54 +02:00
parent 8f6f27722a
commit d09bf34e85
11 changed files with 77 additions and 8719 deletions

View File

@@ -949,7 +949,14 @@ function editUser(userId, username, role, modules) {
updateEditModuleSelection();
const modal = new bootstrap.Modal(document.getElementById('editUserModal'));
const modalElement = document.getElementById('editUserModal');
const modal = new bootstrap.Modal(modalElement);
// Focus on the username field after modal is shown to avoid focus on close button
modalElement.addEventListener('shown.bs.modal', function() {
document.getElementById('edit_username').focus();
}, { once: true });
modal.show();
}