File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change 99use yii \web \UploadedFile ;
1010use yii2mod \cms \models \CmsModel ;
1111use yii2mod \editable \EditableAction ;
12- use yii2mod \rbac \filters \AccessControl ;
1312
1413/**
1514 * Class ManageController
@@ -47,6 +46,21 @@ class ManageController extends Controller
4746 * @var string model class name for attachment model
4847 */
4948 public $ attachmentModelClass = 'yii2mod\cms\models\AttachmentModel ' ;
49+
50+ /**
51+ *
52+ * @var array access control config
53+ */
54+ public $ accessControlConfig = [
55+ 'class ' => 'yii\filters\AccessControl ' ,
56+ 'rules ' => [
57+ [
58+ 'allow ' => true ,
59+ 'roles ' => ['admin ' ],
60+ ],
61+ ],
62+ ];
63+
5064
5165 /**
5266 * @inheritdoc
@@ -64,15 +78,7 @@ public function behaviors()
6478 'file-upload ' => ['post ' ],
6579 ],
6680 ],
67- 'access ' => [
68- 'class ' => AccessControl::class,
69- 'rules ' => [
70- [
71- 'allow ' => true ,
72- 'roles ' => ['admin ' ],
73- ],
74- ],
75- ],
81+ 'access ' => $ this ->accessControlConfig ,
7682 ];
7783 }
7884
You can’t perform that action at this time.
0 commit comments