Implement RBAC migration and role management enhancements

- Added AJAX functionality to fetch role permissions for copying.
- Introduced system role management with permission checks for updates.
- Implemented role deletion with confirmation modal and backend handling.
- Enhanced user role assignment migration scripts to transition from legacy profiles to RBAC.
- Created SQL migration scripts for user roles and permissions mapping.
- Updated user interface to support new role management features including copy permissions and system role indicators.
This commit is contained in:
“VeLiTi”
2026-01-27 15:10:21 +01:00
parent aeda4e4cb9
commit f7a91737bc
30 changed files with 1285 additions and 236 deletions

View File

@@ -78,13 +78,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
//Decode Payload
if (!empty($responses)){$responses = json_decode($responses,true);}else{$responses = '400';}
if ($responses === 'NOK'){
if ($responses === 'NOK' || $responses === 'NULL' || $responses === 'NULL '){
$retry++;
$password_err = $password_err_1 ?? 'Not authorized, please retry';
} elseif ($responses == '1'){
$password_err = $password_err_2 ?? 'Too many login attempts. User blocked, please contact your administrator';
} else {
} elseif (!empty($responses['userkey']) && ctype_xdigit($responses['userkey'])) {
// Start a new session
session_start();
@@ -93,14 +93,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$_SESSION['authorization'] = $responses;
$language_user = trim($_SESSION['authorization']['language']) ?? 'US';
if($responses->profile == 'firmwaretool,products_software,application'){
header('location: index.php?page=firmwaretool');
exit();
} else {
header('location: index.php?language='.$language_user.'');
exit();
}
header('location: index.php?language='.$language_user.'');
exit();
} else {
$retry++;
$password_err = $password_err_1 ?? 'Not authorized, please retry';
}
}
else {