remove user role from select options on user/show/{id}

This commit is contained in:
Charles 2025-10-21 15:30:52 +02:00
parent 0fc507d4c7
commit 143277455a
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class UserOrganizationAppService
$grouped = [];
foreach ($userOrgApps as $uoa) {
if($uoa->getRole()->getName() === 'USER') {
if(!$uoa->getRole()->getName() === 'USER') {
continue; // Skip USER role
}
$app = $uoa->getApplication();
@ -64,6 +64,10 @@ class UserOrganizationAppService
&& $role->getName() === 'SUPER ADMIN') {
continue;
}
// exclude USER role from assignable roles
if ($role->getName() === 'USER') {
continue;
}
$appGroup['rolesArray'][] = [
'id' => $role->getId(),