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