Inserting Access - mymagic/open_hub GitHub Wiki
Insert Access
There are some ways to add access into the database
- through the backend menu:
Site > Sys > Access/Route > Create Access
The
Action
will populated from theController
based on the module selected
- through the backend menu:
Site > Sys > Access/Route > Create Custom Access
You may adding
Access
manually one by one or you can even create fake action
- alternatively, you might want to do it through migration file
public function up()
{
// Access::setAccessRole('module_name','controller_file',['action1','action2'],['role1','role2']);
Access::setAccessRole('todo','TodoController',['index','admin'],['admin','developer']);
}
Assign Access to Role
-
after done the above step (#1 or #2) then you should go to
Site > Sys > Role > Manage Role
to assign theAccess
to theRole
-
choose & select the action/route you want grant access to that
Role