From 72148424760d208bc059f3548576c8e8838b6f68 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Thu, 3 Mar 2016 17:53:19 -0400 Subject: [PATCH] HOR-374 --- workflow/engine/methods/emailServer/emailServer.php | 8 +++++--- workflow/engine/methods/setup/calendarList.php | 9 +++++---- workflow/engine/methods/setup/clearCompiled.php | 7 ++++++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/workflow/engine/methods/emailServer/emailServer.php b/workflow/engine/methods/emailServer/emailServer.php index 237f9e136..f877daf43 100644 --- a/workflow/engine/methods/emailServer/emailServer.php +++ b/workflow/engine/methods/emailServer/emailServer.php @@ -1,9 +1,11 @@ userCanAccess("PM_SETUP") != 1) { - G::SendTemporalMessage("ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels"); - exit(0); +$resultRbac = $RBAC->requirePermissions('PM_SETUP_EMAIL'); +if (!$resultRbac) { + G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); + G::header('location: ../login/login'); + die(); } //Data diff --git a/workflow/engine/methods/setup/calendarList.php b/workflow/engine/methods/setup/calendarList.php index 8204f4120..86f298160 100755 --- a/workflow/engine/methods/setup/calendarList.php +++ b/workflow/engine/methods/setup/calendarList.php @@ -21,10 +21,11 @@ * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ - -if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) { - G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' ); - //G::header('location: ../login/login'); +global $RBAC; +$resultRbac = $RBAC->requirePermissions('PM_SETUP_CALENDAR'); +if (!$resultRbac) { + G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); + G::header('location: ../login/login'); die(); } diff --git a/workflow/engine/methods/setup/clearCompiled.php b/workflow/engine/methods/setup/clearCompiled.php index a2115ef99..9c8e715b3 100755 --- a/workflow/engine/methods/setup/clearCompiled.php +++ b/workflow/engine/methods/setup/clearCompiled.php @@ -22,7 +22,12 @@ * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ global $RBAC; -$RBAC->requirePermissions( 'PM_SETUP' ); +$resultRbac = $RBAC->requirePermissions('PM_SETUP_CLEAR_CACHE'); +if (!$resultRbac) { + G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); + G::header('location: ../login/login'); + die(); +} $oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher->addExtJsScript( 'setup/clearCompiled', true ); //adding a javascript file .js