diff --git a/src/Service/UserOrganizationAppService.php b/src/Service/UserOrganizationAppService.php index e384165..847f6fc 100644 --- a/src/Service/UserOrganizationAppService.php +++ b/src/Service/UserOrganizationAppService.php @@ -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(),