Hi, I love this extension, thank you very much for building it.
I’m running into a weird issue that I am sure is a simple fix, I’m just missing it.
I have the following code setup
'rights'=>array(
'superuserName'=>'Admin',
'authenticatedName'=>'Authenticated',
//'guestName'=>'Guest',
//'defaultRoles'=>array('Guest'),
'install'=>false,
'debug'=>false,
),
When I am not logged in the “Guest” is working correctly, but when I log in and expect to have “Authenticated” rules work, they are not working. I tested this by implicitly assigning “Authenticated” to a user and then it will work. For some reason my default assignment for “Authenticated” for an authenticated person isn’t happening.
Here is my authManager snippet as well:
'authManager'=>array(
'class'=>'RightsAuthManager',
'connectionID'=>'db',
'defaultRoles'=>array('Guest'),
),
I should note that I am using “Yii-User” as my authentication system. Tried to look to see if this is the issue (which is where I am betting it is), but can’t find anything.
Snippet of yii-user code used:
'user'=>array(
// enable cookie-based authentication
'class'=>'RightsWebUser',
'allowAutoLogin'=>true,
'loginUrl' => array('/user/login'),
),
UPDATE:
Fixed my issue, it seems that "Authenticated" by default does not have the biz rule put in. I added
return !Yii::app()->user->isGuest;
to the biz rule for "Authenticated" and now it works. I knew it would be something simple… sorry for the trouble.