remove user role from select options on user/show/{id}
This commit is contained in:
parent
0fc507d4c7
commit
143277455a
|
|
@ -30,7 +30,7 @@ class UserOrganizationAppService
|
||||||
$grouped = [];
|
$grouped = [];
|
||||||
|
|
||||||
foreach ($userOrgApps as $uoa) {
|
foreach ($userOrgApps as $uoa) {
|
||||||
if($uoa->getRole()->getName() === 'USER') {
|
if(!$uoa->getRole()->getName() === 'USER') {
|
||||||
continue; // Skip USER role
|
continue; // Skip USER role
|
||||||
}
|
}
|
||||||
$app = $uoa->getApplication();
|
$app = $uoa->getApplication();
|
||||||
|
|
@ -64,6 +64,10 @@ class UserOrganizationAppService
|
||||||
&& $role->getName() === 'SUPER ADMIN') {
|
&& $role->getName() === 'SUPER ADMIN') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// exclude USER role from assignable roles
|
||||||
|
if ($role->getName() === 'USER') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$appGroup['rolesArray'][] = [
|
$appGroup['rolesArray'][] = [
|
||||||
'id' => $role->getId(),
|
'id' => $role->getId(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue