The following code isn’t working. I would like the ‘Users’ link to only display if the logged in user has been granted access to the ‘admin’ action of the ‘users’ model. However, the link is never displayed.
If you want to use CDbAuthManager, which I’d would recommend, you need an operation for this, e.g. userAdmin (AuthItem-table). Then you need to assign that auth item to a role (AuthChild-table) and assign that role to the respective users (AuthAssignment-table).
So if checkAccess() requires the use of either CDbAuthManager or CPhpAuthManager, is there another way to check against the accessRules defined in a controller? I am using the default UserIdentify component for authentication.
As far as I know the Controller’s accessControl-function is only called to check if the user is allowed to run the requested action or not. In other words you need to use an Auth Manager to use checkAccess().