I have a project that is broadly organised as per Yii Directory Structure. So the project contains frontend, backend, common and console top level directories. I am also using AuthManager to handle access with yii-auth living in the common directory. The problem I have is that when trying to authorise the different parts of the app, frontend and backend I’m not too sure how to differentiate between them with the authManager operations.
For example both frontend and backend have a defaultController with associated actions. How can I set up an authManager operation for backend.defaultController.index and a separate one for frontend.defaultController .index so that different roles will have different access? I’ve been looking into namespaces but can’t seem to get it to work.
My other options would be to rename the controllers and have an explicit backendDefaultController but it doesn’t seem very tidy.
Any thoughts greatly appreciated…