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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user