public function checkPermission(Vtiger_Request $request) { parent::checkPermission($request); $recordId = $request->get('record'); if (!$recordId) { throw new AppException(vtranslate('LBL_PERMISSION_DENIED', 'Vtiger')); } }
public function checkPermission(Vtiger_Request $request) { parent::checkPermission($request); $moduleModel = Vtiger_Module_Model::getInstance($request->getModule()); $currentUserPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel(); if (!$currentUserPrivilegesModel->hasModulePermission($moduleModel->getId())) { throw new AppException('LBL_PERMISSION_DENIED'); } }