From 950c7c80e3294e690c762a3f191538221d9bd05d Mon Sep 17 00:00:00 2001 From: prasad <prasad@vtiger.com> Date: Thu, 22 Mar 2018 09:13:56 +0530 Subject: [PATCH] Fixes #937: Check for EditView instead of CreateView when Calendar DragDrop --- modules/Calendar/actions/SaveAjax.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/Calendar/actions/SaveAjax.php b/modules/Calendar/actions/SaveAjax.php index dba7505ba..398fc9e31 100644 --- a/modules/Calendar/actions/SaveAjax.php +++ b/modules/Calendar/actions/SaveAjax.php @@ -14,7 +14,10 @@ class Calendar_SaveAjax_Action extends Vtiger_SaveAjax_Action { $moduleName = $request->getModule(); $record = $request->get('record'); - $actionName = ($record) ? 'EditView' : 'CreateView'; + // Child class permission check support - DragDropAjax + $recordId = $request->get('id'); + + $actionName = ($record || $recordId) ? 'EditView' : 'CreateView'; if(!Users_Privileges_Model::isPermitted($moduleName, $actionName, $record)) { throw new AppException(vtranslate('LBL_PERMISSION_DENIED')); } -- GitLab