1 | <?php |
||
16 | class AccessControl extends \yii\filters\AccessControl |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | public $params = []; |
||
22 | |||
23 | /** |
||
24 | * @var array list of actions that not need to check access |
||
25 | */ |
||
26 | public $allowActions = []; |
||
27 | |||
28 | /** |
||
29 | * @inheritdoc |
||
30 | */ |
||
31 | public function beforeAction($action): bool |
||
49 | |||
50 | /** |
||
51 | * @inheritdoc |
||
52 | */ |
||
53 | protected function isActive($action): bool |
||
61 | |||
62 | /** |
||
63 | * Returns a value indicating whether a current url equals `errorAction` property of the ErrorHandler component |
||
64 | * |
||
65 | * @param Action $action |
||
66 | * |
||
67 | * @return bool |
||
68 | */ |
||
69 | private function isErrorPage(Action $action): bool |
||
77 | |||
78 | /** |
||
79 | * Returns a value indicating whether a current url equals `loginUrl` property of the User component |
||
80 | * |
||
81 | * @param Action $action |
||
82 | * |
||
83 | * @return bool |
||
84 | */ |
||
85 | private function isLoginPage(Action $action): bool |
||
95 | |||
96 | /** |
||
97 | * Returns a value indicating whether a current url exists in the `allowActions` list. |
||
98 | * |
||
99 | * @param Action $action |
||
100 | * |
||
101 | * @return bool |
||
102 | */ |
||
103 | private function isAllowedAction(Action $action): bool |
||
130 | } |
||
131 |