File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -101,16 +101,18 @@ Configuring guards is very simple. Your module's config would look like so:
101101 'user' => [
102102 'guards' => [
103103 'ModuleName' => [
104- \Application\Controller\IndexController::class => [
105- 'default' => [], // anyone can access
106- ],
107- \Application\Controller\MemberController::class => [
108- 'default' => ['user'], // specific role access
109- ],
110- \Application\Controller\AdminController::class => [
111- 'default' => ['admin'],
112- 'actions' => [ // action-level guards
113- 'list' => [ 'user' ], // role 'user' can access 'listAction' on AdminController
104+ "controllers" => [
105+ \Application\Controller\IndexController::class => [
106+ 'default' => [], // anyone can access
107+ ],
108+ \Application\Controller\MemberController::class => [
109+ 'default' => ['user'], // specific role access
110+ ],
111+ \Application\Controller\AdminController::class => [
112+ 'default' => ['admin'],
113+ 'actions' => [ // action-level guards
114+ 'list' => [ 'user' ], // role 'user' can access 'listAction' on AdminController
115+ ],
114116 ],
115117 ],
116118 ],
You can’t perform that action at this time.
0 commit comments