What is the best way override CDbAuthManager->checkAccess() to aways return true when a user is in the ‘Admin’ role?
This way I don't have to add all of the tasks and operations to the admin role.
I'll have a lot of tasks and operations.
I already have my own DbAuthManager class that extends CDbAuthManager.
Something like (pseudo-code):
if (isInRole($userId,'Admin') return true;
It would be cool if we could specify an array with the roles we want to have full access.
$auth->setFullAccessRoles('President','VicePresident');
Then in the pseudo-code above:
foreach ($fullAccessRolesArray as $role) { if (isInRole($userId,$role) return true; }