add test workspaces for lbc, sandbox

This commit is contained in:
Fernando Ontiveros
2025-09-09 11:00:34 -04:00
parent e76fedf1cf
commit f7c0689ddf

View File

@@ -35,15 +35,34 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1 || $RBAC->userCanAccess('PM_USERS') ==
} }
if ($RBAC->userCanAccess('PM_SETUP') == 1 && SYS_SYS == 'lbc') { // Test workspaces for LBC. Check if the user has access to 'PM_SETUP'
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
// Define menu options based on the system environment
$menuOptions = [
'lbc' => [
'id' => 'LBC_INBOX',
'url' => '/lbc/inbox',
'label' => 'LBC',
],
'sandbox' => [
'id' => 'LBC_INBOX',
'url' => '/sandbox/inbox',
'label' => 'SANDBOX',
],
];
// Check if current system is in the defined menu options
if (isset($menuOptions[SYS_SYS])) {
$option = $menuOptions[SYS_SYS];
$G_TMP_MENU->AddIdRawOption( $G_TMP_MENU->AddIdRawOption(
'LBC_INBOX', $option['id'],
'/lbc/inbox', $option['url'],
"LBC", $option['label'],
'', '',
'', '',
'absolute' 'absolute'
); );
}
} }
// PLUGINS MENUS // PLUGINS MENUS