| Conditions | 4 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function checkPermission(App\Request $request) |
||
| 37 | { |
||
| 38 | if ($request->isEmpty('record', true)) { |
||
| 39 | throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406); |
||
| 40 | } |
||
| 41 | $this->recordModel = Vtiger_Record_Model::getInstanceById($request->getInteger('record'), 'Calendar'); |
||
| 42 | if (!$this->recordModel->privilegeToDelete() || !$this->recordModel->privilegeToMoveToTrash()) { |
||
| 43 | throw new \App\Exceptions\NoPermitted('ERR_PERMISSION_DENIED', 406); |
||
| 44 | } |
||
| 55 |