Rights is one of user interface for Yii's Role Base Access Control extension. It is one of most downloaded extensions in Yii's Web.
Sometime developers might encounter errors or incomprehensive messages from Rights while implementing it. While there is a thread dedicated to solve the Rights problems, but because it already grown to big, I decide to collect common problems with their solutions into one wiki so it will be easier for everyone to check.
'rights'=>array( 'userClass' => 'AnotherName', ),
Problem
Need to change the table name for the sake of consistency
Solutions
Add the code to 'authManager' in the Yii configuration files:
'authManager' => array( 'class' => 'RDbAuthManager', 'assignmentTable' => 'authassignment', 'itemTable' => 'authitem', 'itemChildTable' => 'authitemchild', 'rightsTable' => 'rights', ),
Problem
Got message: Filter "rights" is invalid. Controller "XyzController" does not have the filter method "filterrights"."
Solution
You must extend the controller class from RController. The easiest way is change the code at /protected/components/Controller.php
class Controller extends RController
Problem
Got message: "Property "CWebApplication.rights" is not defined."
Solution
It seems you have forgot to include "rights" in the Yii's module configuration. Please consult to documentation.
Problem
The Guest seems like not working.
Solution
Add following setting to the Yii configuration file:
'authManager' => array( 'class'=>'RDbAuthManager', 'defaultRoles'=>array('Guest'), ),
Total 4 comments
I just tried my ext rights and succeed in the installation process. But when I choose the Assignments errors like this:
Error 403
There must be at least one superuser!
Can someone give a hint on this one, anyone much appreciated.
hi friends after instaling the Rights module whan i want to access it, following error is accour. Error 403 There must be at least one superuser!
plz tell me how to fix it.
thanks in advance.
Very useful Troubleshooting...
also its in documentation but in end of file:
Leave a comment
Please login to leave your comment.