@@ -62,13 +62,16 @@ discard block |
||
| 62 | 62 | * This method is invoked right before an action is to be executed (after all possible filters.) |
| 63 | 63 | * You may override this method to do last-minute preparation for the action. |
| 64 | 64 | * @param Action $action the action to be executed. |
| 65 | - * @return bool whether the action execution should be continued. |
|
| 65 | + * @return null|boolean whether the action execution should be continued. |
|
| 66 | 66 | */ |
| 67 | 67 | public function beforeAction($action) |
| 68 | 68 | { |
| 69 | 69 | return $this->checkActions($action) ?: $this->denyAccess($action); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | + /** |
|
| 73 | + * @param Action $action |
|
| 74 | + */ |
|
| 72 | 75 | protected function checkActions($action) |
| 73 | 76 | { |
| 74 | 77 | foreach ($this->actions as $names => $permissions) { |
@@ -110,8 +113,8 @@ discard block |
||
| 110 | 113 | * Denies the access of the user. |
| 111 | 114 | * The default implementation will redirect the user to the login page if he is a guest; |
| 112 | 115 | * if the user is already logged, a 403 HTTP exception will be thrown. |
| 113 | - * @param User|false $user the current user or boolean `false` in case of detached User component |
|
| 114 | 116 | * @throws ForbiddenHttpException if the user is already logged in or in case of detached User component. |
| 117 | + * @param Action $action |
|
| 115 | 118 | */ |
| 116 | 119 | protected function denyAccess($action) |
| 117 | 120 | { |