Conditions | 1 |
Paths | 1 |
Total Lines | 37 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
14 | public function behaviors() |
||
15 | { |
||
16 | 14 | return [ |
|
17 | 'access' => [ |
||
18 | 'class' => 'yii\filters\AccessControl', |
||
19 | 'rules' => [ |
||
20 | [ |
||
21 | 'allow' => true, |
||
22 | 'actions' => ['index'], |
||
23 | 'roles' => ['@', 'AdminModule'], |
||
24 | ], |
||
25 | [ |
||
26 | 'allow' => true, |
||
27 | 'actions' => ['login'], |
||
28 | 'roles' => ['?'], |
||
29 | ], |
||
30 | [ |
||
31 | 'allow' => true, |
||
32 | 'actions' => ['logout'], |
||
33 | 'roles' => ['@'], |
||
34 | ], |
||
35 | [ |
||
36 | 'allow' => true, |
||
37 | 'actions' => ['error'], |
||
38 | 'roles' => ['*'], |
||
39 | ], |
||
40 | // everything else is denied |
||
41 | ], |
||
42 | ], |
||
43 | 'verbs' => [ |
||
44 | 'class' => 'yii\filters\VerbFilter', |
||
45 | 'actions' => [ |
||
46 | 'logout' => ['post'], |
||
47 | ], |
||
48 | ], |
||
49 | ]; |
||
50 | } |
||
51 | 3 | ||
79 |