Hi All,
I use yii-user and right for access to mu pages
I want that to my Category Controller user with Admin level has access, but user with "Operator" access level has NO access
My category page has url http://localhost/local-yii-tyb.com/tybapp/backend/category/index, with "backend/"
<?php
class CategoryController extends Controller
{
public function filters()
{
return array(
'rights',
);
}
/* public function allowedActions() // I comment this function
{
return 'index, edit, delete, find_category';
} */
...
?>
In /authItem/permissions page of my admin I see :
So nobody has access to "category/index", excepting Superadmin, but when I log to system as Admin(with superadmin=1) it also has no acccess too !
I try to debug tybapp/protected/modules/rights/components/RightsFilter.php file and see that :
that in code $authItem .= ucfirst($controller->id);
$authItem has value "Backend/category.Index", but in database I see in "authitem" table I see "Category.Index" value, not "Backend/" and first letter of "category" is small
letter. can it be reason of errror and how to fix it ?
Also please give some link to good expanations how these rights pages work, I have to guess somethimes…
In config :
'rights'=>array(
'superuserName'=>'Admin', // Name of the role with super user privileges.
'authenticatedName'=>'Authenticated', // Name of the authenticated user role.
'userIdColumn'=>'id', // Name of the user id column in the database.
'userNameColumn'=>'username', // Name of the user name column in the database.
'enableBizRule'=>true, // Whether to enable authorization item business rules.
'enableBizRuleData'=>true, // Whether to enable data for business rules.
'displayDescription'=>true, // Whether to use item description instead of name.
'flashSuccessKey'=>'RightsSuccess', // Key to use for setting success flash messages.
'flashErrorKey'=>'RightsError', // Key to use for setting error flash messages.
'baseUrl'=>'/rights', // Base URL for Rights. Change if module is nested.
'layout'=>'rights.views.layouts.main', // Layout to use for displaying Rights.
'appLayout'=>'application.views.layouts.main', // Application layout.
'cssFile'=>'/rights.css', // Style sheet file to use for Rights.
'install'=>false, // Whether to enable installer.
'debug'=>false,
...
'authManager'=>array(
'class'=>'RDbAuthManager',
'defaultRoles' => array( 'Guest' ),
'connectionID'=>'db',
'itemTable'=>'authitem',
'itemChildTable'=>'authitemchild',
'assignmentTable'=>'authassignment',
'rightsTable'=>'rights',
),
Thanks!