Hi,
I’m already using rights (0.9) in other 3 applications and, trying to install the 1.2 to a new one, got stuck in a 403 error. Even my Admin user gets 403 errors. My Controller extends RController, my config:
'rights'=>array(
'install'=>false,
'userIdColumn'=>'idusuario',
'userNameColumn'=>'login',
'userClass'=>'CadUsuario',
'debug'=>true
),
....
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'class'=>'RWebUser',
'allowAutoLogin'=>true,
),
...
'authManager'=>array(
'class'=>'RDbAuthManager',
'connectionID'=>'db',
'defaultRoles'=>array('Guest')
),
I have a ‘CadUsuario’ class, that control my users with md5+seed password.
The users with ‘Admin’ roles, can access successfully my rights module. I can set permissions like
public function allowedActions(){
return 'index';
}
But, my Admin account doesn’t have access to anywhere else.
Error example:
CHttpException
You are not authorized to perform this action. (/***/***/***/webfolder/protected/modules/rights/components/RController.php:62)
#0 /***/***/***/webfolder/protected/modules/rights/components/RightsFilter.php(57): RController->accessDenied()
#1 /***/***/***/yii/1.1.6/framework/web/filters/CFilter.php(39): RightsFilter->preFilter(Object(CFilterChain))
#2 /***/***/***/webfolder/protected/modules/rights/components/RController.php(36): CFilter->filter(Object(CFilterChain))
#3 /***/***/***/yii/1.1.6/framework/web/filters/CInlineFilter.php(59): RController->filterRights(Object(CFilterChain))
#4 /***/***/***/yii/1.1.6/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain))
#5 /***/***/***/yii/1.1.6/framework/web/CController.php(283): CFilterChain->run()
#6 /***/***/***/yii/1.1.6/framework/web/CController.php(257): CController->runActionWithFilters(Object(CInlineAction), Array)
#7 /***/***/***/yii/1.1.6/framework/web/CWebApplication.php(328): CController->run('error')
#8 /***/***/***/yii/1.1.6/framework/base/CErrorHandler.php(279): CWebApplication->runController('site/error')
#9 /***/***/***/yii/1.1.6/framework/base/CErrorHandler.php(178): CErrorHandler->render('error', Array)
#10 /***/***/***/yii/1.1.6/framework/base/CErrorHandler.php(103): CErrorHandler->handleException(Object(CHttpException))
#11 /***/***/***/yii/1.1.6/framework/base/CApplication.php(631): CErrorHandler->handle(Object(CExceptionEvent))
#12 [internal function]: CApplication->handleException(Object(CHttpException))
#13 {main}
Maybe, if you guys, could point me the right direction about the “isSuperuser” method in RWebUser, how it compare the users, where it is … because, my best guess, now, is that it is givin’ false where it is suposed to be true.
Sorry taking up your precious time, but, i’m really stuck here.
Sorry by the bad english.