@@ -70,13 +70,16 @@ discard block |
||
70 | 70 | * This method is invoked right before an action is to be executed (after all possible filters.) |
71 | 71 | * You may override this method to do last-minute preparation for the action. |
72 | 72 | * @param Action $action the action to be executed |
73 | - * @return bool whether the action execution should be continued |
|
73 | + * @return null|boolean whether the action execution should be continued |
|
74 | 74 | */ |
75 | 75 | public function beforeAction($action) |
76 | 76 | { |
77 | 77 | return $this->checkActions($action) ?: $this->denyAccess($action); |
78 | 78 | } |
79 | 79 | |
80 | + /** |
|
81 | + * @param Action $action |
|
82 | + */ |
|
80 | 83 | protected function checkActions($action) |
81 | 84 | { |
82 | 85 | foreach ($this->actions as $names => $permissions) { |
@@ -126,8 +129,8 @@ discard block |
||
126 | 129 | * Denies the access of the user. |
127 | 130 | * The default implementation will redirect the user to the login page if he is a guest; |
128 | 131 | * if the user is already logged, a 403 HTTP exception will be thrown. |
129 | - * @param User|false $user the current user or boolean `false` in case of detached User component |
|
130 | 132 | * @throws ForbiddenHttpException if the user is already logged in or in case of detached User component |
133 | + * @param Action $action |
|
131 | 134 | */ |
132 | 135 | protected function denyAccess($action) |
133 | 136 | { |