Urgent question - authManager component

Hi,

Very urgent matter:

In an advanced application do I really need any authManager in the console part???

I would like to move authManager ( actually \dektrium\rbac\components\DbManager ) out of common/config/main.php to frontend/config/main.php and backend/config/main.php but SKIP this component in console (and restful-api) tree. So the question is:

Is it really necessary for Yii? Can an app tree work without it?

Please, feedback asap - I need to complete before Halloween!

you can remove it but I guess they include it in the console config because there are cli command(s) that come builtin with dektrium/rbacnote you won’t be able to use those commands if you remove it.

Thank you - very nice feedback!

Actually, I have asked this question due to a notice in Yii Guide:

https://www.yiiframework.com/doc/guide/2.0/en/security-authorization

It reads:

Note: If you are using yii2-basic-app template, there is a config/console.php configuration file where the authManager needs to be declared additionally to config/web.php . In case of yii2-advanced-app the authManager should be declared only once in common/config/main.php .

And this is unrealated to Dektrium :-/

I think it will still work if you remove it form common/config and include where you like, it was in the common/config to avoid duplication so it does not really matter

Well,

Indeed, authManager is not necessary, but “user” (implementing IdentityInterface) is necessary - but it may be even simple dummy component.

Thank you guts, case is closed!