From 143277455a50fbf089169f386169e18c9a0cd4b2 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Oct 2025 15:30:52 +0200 Subject: [PATCH] remove user role from select options on user/show/{id} --- src/Service/UserOrganizationAppService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(),