add test workspaces for lbc, sandbox
This commit is contained in:
@@ -35,16 +35,35 @@ 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
|
||||
if (file_exists(PATH_CORE . 'menus/plugin.php')) {
|
||||
|
||||
Reference in New Issue
Block a user