Commit 24f513785e873367d9bf6930631420eed050ca86
1 parent
8c3af0d3
access control
Showing
1 changed file
with
17 additions
and
0 deletions
Show diff stats
controllers/ManageController.php
@@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
9 | use yii\filters\VerbFilter; | 9 | use yii\filters\VerbFilter; |
10 | use yii\web\Controller; | 10 | use yii\web\Controller; |
11 | use yii\web\NotFoundHttpException; | 11 | use yii\web\NotFoundHttpException; |
12 | + use yii\filters\AccessControl; | ||
12 | 13 | ||
13 | class ManageController extends Controller | 14 | class ManageController extends Controller |
14 | { | 15 | { |
@@ -32,6 +33,22 @@ | @@ -32,6 +33,22 @@ | ||
32 | 'delete' => [ 'post' ], | 33 | 'delete' => [ 'post' ], |
33 | ], | 34 | ], |
34 | ], | 35 | ], |
36 | + 'access' => [ | ||
37 | + 'class' => AccessControl::className(), | ||
38 | + 'rules' => [ | ||
39 | + [ | ||
40 | + 'actions' => [ | ||
41 | + 'login', | ||
42 | + 'error', | ||
43 | + ], | ||
44 | + 'allow' => true, | ||
45 | + ], | ||
46 | + [ | ||
47 | + 'allow' => true, | ||
48 | + 'roles' => [ '@' ], | ||
49 | + ], | ||
50 | + ], | ||
51 | + ], | ||
35 | ]; | 52 | ]; |
36 | } | 53 | } |
37 | 54 |