| Conditions | 4 | 
| Paths | 3 | 
| Total Lines | 14 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 26 | public function checkAccess($action) | ||
| 27 |     { | ||
| 28 |         if ($action->controller->id === 'index') { | ||
| 29 | return true; | ||
| 30 | } | ||
| 31 | |||
| 32 |         if (!\Yii::$app->user->can('AdminModule') || | ||
| 33 | !\Yii::$app->user->can($this->getCurrentPermissionName($action)) | ||
| 34 |         ) { | ||
| 35 |             throw new ForbiddenHttpException(Yii::t('app', 'Access Denied')); | ||
| 36 | } | ||
| 37 | |||
| 38 | return true; | ||
| 39 | } | ||
| 40 | |||
| 62 |