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(
'LBC_INBOX',
'/lbc/inbox',
"LBC",
$option['id'],
$option['url'],
$option['label'],
'',
'',
'absolute'
);
}
}
// PLUGINS MENUS