Users are able to access the plugins tab in ADMIN even if they dont have the permission "PM_SETUP_PLUGINS" in their role

This commit is contained in:
dheeyi william
2022-01-06 15:06:24 -04:00
committed by William Barra
parent 51fd61657e
commit ccacc0813a

View File

@@ -385,14 +385,19 @@ if ($licenseStatusInfo["message"] != "") {
/*----------------------------------********---------------------------------*/
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
/*----------------------------------********---------------------------------*/
$G_TMP_MENU->AddIdRawOption(
'PMENTERPRISE',
'../enterprise/addonsStore',
G::LoadTranslation('ID_MENU_NAME') . $licStatusMsg,
'',
'',
'plugins'
);
if (
$RBAC->userCanAccess('PM_SETUP_PLUGINS') === 1 &&
$RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1
) {
$G_TMP_MENU->AddIdRawOption(
'PMENTERPRISE',
'../enterprise/addonsStore',
G::LoadTranslation('ID_MENU_NAME') . $licStatusMsg,
'',
'',
'plugins'
);
}
if ($RBAC->userCanAccess('PM_SETUP_CUSTOM_CASES_LIST') == 1) {
$G_TMP_MENU->AddIdRawOption(
'CASES_LIST_SETUP',