示例#1
0
 public function checkPermission(Vtiger_Request $request)
 {
     parent::checkPermission($request);
     $recordId = $request->get('record');
     if (!$recordId) {
         throw new AppException(vtranslate('LBL_PERMISSION_DENIED', 'Vtiger'));
     }
 }
示例#2
0
 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');
     }
 }