From 75838a9183e38d7d49744510335a87ba31b08ba0 Mon Sep 17 00:00:00 2001 From: Uma S <uma.s@vtiger.com> Date: Thu, 1 Aug 2019 15:21:19 +0530 Subject: [PATCH] Checkpermission return values navigated back to caller api --- includes/runtime/Controller.php | 1 + modules/Accounts/actions/TransferOwnership.php | 1 + modules/Accounts/views/AccountHierarchy.php | 2 +- modules/Calendar/actions/ActivityReminder.php | 2 +- modules/Calendar/actions/CalendarActions.php | 2 +- modules/Calendar/actions/CalendarUserActions.php | 2 +- modules/Campaigns/actions/DetailAjax.php | 2 +- modules/Campaigns/actions/RelationAjax.php | 2 +- modules/Vtiger/actions/Save.php | 2 +- modules/Vtiger/views/Detail.php | 2 +- modules/Vtiger/views/Edit.php | 2 +- modules/Vtiger/views/RelatedList.php | 3 +-- 12 files changed, 12 insertions(+), 11 deletions(-) diff --git a/includes/runtime/Controller.php b/includes/runtime/Controller.php index fdaa4be3c..962244a9f 100644 --- a/includes/runtime/Controller.php +++ b/includes/runtime/Controller.php @@ -129,6 +129,7 @@ abstract class Vtiger_Action_Controller extends Vtiger_Controller { throw new AppException(vtranslate('LBL_PERMISSION_DENIED')); } } + return true; } } diff --git a/modules/Accounts/actions/TransferOwnership.php b/modules/Accounts/actions/TransferOwnership.php index b04eec399..a8816b1ea 100644 --- a/modules/Accounts/actions/TransferOwnership.php +++ b/modules/Accounts/actions/TransferOwnership.php @@ -27,6 +27,7 @@ class Accounts_TransferOwnership_Action extends Vtiger_Action_Controller { $this->transferRecordIds[] = $recordId; } } + return true; } public function process(Vtiger_Request $request) { diff --git a/modules/Accounts/views/AccountHierarchy.php b/modules/Accounts/views/AccountHierarchy.php index 6e31b143f..c07916e7a 100644 --- a/modules/Accounts/views/AccountHierarchy.php +++ b/modules/Accounts/views/AccountHierarchy.php @@ -16,7 +16,7 @@ class Accounts_AccountHierarchy_View extends Vtiger_View_Controller { } public function checkPermission(Vtiger_Request $request) { - parent::checkPermission($request); + return parent::checkPermission($request); } function preProcess(Vtiger_Request $request, $display = true) { diff --git a/modules/Calendar/actions/ActivityReminder.php b/modules/Calendar/actions/ActivityReminder.php index b32e02655..fe1b4aee5 100644 --- a/modules/Calendar/actions/ActivityReminder.php +++ b/modules/Calendar/actions/ActivityReminder.php @@ -35,7 +35,7 @@ class Calendar_ActivityReminder_Action extends Vtiger_Action_Controller{ } public function checkPermission(Vtiger_Request $request) { - parent::checkPermission($request); + return parent::checkPermission($request); } public function process(Vtiger_Request $request) { diff --git a/modules/Calendar/actions/CalendarActions.php b/modules/Calendar/actions/CalendarActions.php index 7256e8b64..aac5e9e41 100644 --- a/modules/Calendar/actions/CalendarActions.php +++ b/modules/Calendar/actions/CalendarActions.php @@ -29,7 +29,7 @@ class Calendar_CalendarActions_Action extends Vtiger_BasicAjax_Action { } public function checkPermission(Vtiger_Request $request) { - parent::checkPermission($request); + return parent::checkPermission($request); } public function process(Vtiger_Request $request) { diff --git a/modules/Calendar/actions/CalendarUserActions.php b/modules/Calendar/actions/CalendarUserActions.php index 41744c24e..22fed3810 100755 --- a/modules/Calendar/actions/CalendarUserActions.php +++ b/modules/Calendar/actions/CalendarUserActions.php @@ -42,7 +42,7 @@ class Calendar_CalendarUserActions_Action extends Vtiger_Action_Controller{ } public function checkPermission(Vtiger_Request $request) { - parent::checkPermission($request); + return parent::checkPermission($request); } public function process(Vtiger_Request $request) { diff --git a/modules/Campaigns/actions/DetailAjax.php b/modules/Campaigns/actions/DetailAjax.php index 31f8f1734..5a75e4dfd 100644 --- a/modules/Campaigns/actions/DetailAjax.php +++ b/modules/Campaigns/actions/DetailAjax.php @@ -30,7 +30,7 @@ class Campaigns_DetailAjax_Action extends Vtiger_BasicAjax_Action { } public function checkPermission(Vtiger_Request $request) { - parent::checkPermission($request); + return parent::checkPermission($request); } public function process(Vtiger_Request $request) { $mode = $request->get('mode'); diff --git a/modules/Campaigns/actions/RelationAjax.php b/modules/Campaigns/actions/RelationAjax.php index 3cfd4fa8d..0af2bbfb2 100644 --- a/modules/Campaigns/actions/RelationAjax.php +++ b/modules/Campaigns/actions/RelationAjax.php @@ -35,7 +35,7 @@ class Campaigns_RelationAjax_Action extends Vtiger_RelationAjax_Action { } public function checkPermission(Vtiger_Request $request) { - parent::checkPermission($request); + return parent::checkPermission($request); } /** diff --git a/modules/Vtiger/actions/Save.php b/modules/Vtiger/actions/Save.php index 60ea03eaa..874dc7846 100644 --- a/modules/Vtiger/actions/Save.php +++ b/modules/Vtiger/actions/Save.php @@ -28,7 +28,7 @@ class Vtiger_Save_Action extends Vtiger_Action_Controller { throw new AppException(vtranslate('LBL_PERMISSION_DENIED')); } } - parent::checkPermission($request); + return parent::checkPermission($request); } public function validateRequest(Vtiger_Request $request) { diff --git a/modules/Vtiger/views/Detail.php b/modules/Vtiger/views/Detail.php index f7745a5fb..33852d1fd 100644 --- a/modules/Vtiger/views/Detail.php +++ b/modules/Vtiger/views/Detail.php @@ -65,7 +65,7 @@ class Vtiger_Detail_View extends Vtiger_Index_View { throw new AppException(vtranslate('LBL_PERMISSION_DENIED')); } } - parent::checkPermission($request); + return parent::checkPermission($request); } function preProcess(Vtiger_Request $request, $display=true) { diff --git a/modules/Vtiger/views/Edit.php b/modules/Vtiger/views/Edit.php index 683376294..00762d4e0 100644 --- a/modules/Vtiger/views/Edit.php +++ b/modules/Vtiger/views/Edit.php @@ -34,7 +34,7 @@ Class Vtiger_Edit_View extends Vtiger_Index_View { throw new AppException(vtranslate('LBL_PERMISSION_DENIED')); } } - parent::checkPermission($request); + return parent::checkPermission($request); } public function setModuleInfo($request, $moduleModel) { diff --git a/modules/Vtiger/views/RelatedList.php b/modules/Vtiger/views/RelatedList.php index a5a7552ec..fa2e03e67 100644 --- a/modules/Vtiger/views/RelatedList.php +++ b/modules/Vtiger/views/RelatedList.php @@ -17,7 +17,7 @@ class Vtiger_RelatedList_View extends Vtiger_Index_View { } public function checkPermission(Vtiger_Request $request) { - parent::checkPermission($request); + return parent::checkPermission($request); } function process(Vtiger_Request $request) { @@ -28,7 +28,6 @@ class Vtiger_RelatedList_View extends Vtiger_Index_View { $relatedModuleModel = Vtiger_Module_Model::getInstance($relatedModuleName); $moduleFields = $relatedModuleModel->getFields(); - $searchParams = $request->get('search_params'); if(empty($searchParams)) { -- GitLab