How Can I Set $Authfile?

Hi.

I am using Rbac with PhpManager, and the default value of $authFile is ‘@app/data/rbac.php’, but when I using advanced template, there are frontend, backend,console sections.

when I write logic code in frontend, @app means frontend, there should have frontend/data/rbac.php file, How can I set $authFile = ‘@common/data/rbac.php’ or ‘@console/data/rbac.php’? then in frontend, backend, I can use one rbac.php file.

I find the answer,just simplely add in config file:


'authManager' => [

            'class' => 'yii\rbac\PhpManager',

            'authFile' => '@common/data/rbac.php',

            'defaultRoles' => ['member'],

        ],