Yii Framework Forum: SRBAC Installation Problem - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

SRBAC Installation Problem Rate Topic: -----

#1 User is offline   queej 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 71
  • Joined: 04-February 10

Posted 01 March 2010 - 08:33 PM

I stepped through the guide and installed SRBAC, but when I go to the index.php?r=srbac page I get a 404. I commented out my URL manager just in case that was a problem. Still no luck.

I added all the sections to the config/main.php and installed the srbac directory in my protected/modules directory.

Any idea on what I might be doing wrong?
0

#2 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 03 March 2010 - 12:24 AM

Could you post your srbac config here?
0

#3 User is offline   queej 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 71
  • Joined: 04-February 10

Posted 03 March 2010 - 07:14 AM

Thank you! Yes, here it is:

return array
(
 'basePath' => dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
 'name' => 'harvestation',

 // preloading 'log' component                                                                                                                                                     
 'preload' => array( 'log' ),

 // autoloading model and component classes                                                                                                                                        
 'import' =>
 array(
       'application.models.*',
       'application.components.*',
 'application.modules.srbac.controllers.SBaseController',                                                                   
       ),

 // application components                                                                                                                                                         
 'components' =>
 array(
       'user' => array(
                       'allowAutoLogin'  =>  true, // enable cookie-based authentication                                                                                           
                       ),
       'db'  =>  array(
                       'class'             => 'CDbConnection',
                       'connectionString'  => 'pgsql:host=localhost;port=5432;dbname=authentr_pantry',
                       'username'          => '........',
                       'password'          => '.......',
                       'charset'           => 'utf8'
                       ),
       'errorHandler' => array(
                               'errorAction' => 'site/error',
                               ),
       'log' => array(
                      'class' => 'CLogRouter',
                      'routes' => array(
                                        array(
                                              'class' => 'CFileLogRoute',
                                              'levels' => 'error, warning',
                                              ),
                                        ),
                      ),
       'urlManager' => array( 'urlFormat'      => 'path',
                              'showScriptName' => false,
                              ),
       'authManager' => array(
                              'class'           => 'CDbAuthManager', // The type of Manager (Database)                                                                             
                              'connectionID'    => 'db',             // The database component used                                                                                
                              'itemTable'       => 'authitem',       // The itemTable name (default:authitem)                                                                      
                              'assignmentTable' => 'authassignment', // The assignmentTable name (default:authassignment)                                                          
                              'itemChildTable'  => 'authitemchild',  // The itemChildTable name (default:authitemchild)                                                            
                              ),
       'modules'        => array(
                                 'srbac'      =>
                                 array(
                                       'userclass'         => 'Users', //optional defaults to                                                                                      
                                       'userid'            => 'user_ID', //optional defaults to                                                                                    
                                       'username'          => 'username', //optional defaults                                                                                      
                                       'debug'             => true, //optional defaults to false                                                                                   
                                       'pageSize'          => 10, //optional defaults to 15                                                                                        
                                       'superUser'         => 'Authorizer', //optional defaults to Authorizer                                                                      
                                       'css'               => 'srbac.css', //optional defaults to srbac.css                                                                        
                                       'layout'            => 'application.views.layouts.admin', //optional defaults to empty string, must be an existing alias                    
                                       'notAuthorizedView' => 'srbac.views.authitem.unauthorized ', // optional defaults to //srbac.views.authitem.unauthorized, must be an existi\
ng alias                                                                                                                                                                           
                                       'alwaysAllowed'     => array( //optional defaults to gui                                                                                    
                                                                    'SiteLogin','SiteLogout','SiteIndex','SiteAdmin', 'SiteError', 'SiteContact'
                                                                    ),
                                       'userActions'          => array(//optional defaults to empty array                                                                          
                                                                       'Show','View','List'
                                                                       ),
                                       'listBoxNumberOfLines' => 15, //optional defaults to 10                                                                                     
                                       'imagesPath'           => 'srbac.images', //optional defaults to srbac.images                                                               
                                       'imagesPack'           => 'noia', //optional defaults to noia                                                                               
                                       'iconText'             => true, //optional defaults to false                                                                                
                                       'header'               => 'srbac.views.authitem.header', //optional defaults to// srbac.views.authitem.header, must be an existing alias    
                                       'footer'               => 'srbac.views.authItem.footer', //optional defaults to// srbac.views.authitem.footer, must be an existing alias    
                                       'showHeader'           => true, //optional defaults to false                                                                                
                                       'showFooter'           => true, //optional defaults to false                                                                                
                                       'alwaysAllowedPath'    => 'srbac.components', //optional defaults to srbac.components// must be an existing alias                           
                                       )
                                 ),
       ),
 // application-level parameters that can be accessed                                                                                                                              
 // using Yii::app()->params['paramName']                                                                                                                                          
 'params' => array(
                   'adminEmail' => 'dqj@authentrics.com',
                   ),
 );



My app is postgres based, and everything else is working fine. I tried turning off the UrlManager and using the index.php/?r=srbac urls, and using the /srbac url style that the rest of my app uses, but neither works.

Oh, the web site is here: harvestation.

Thanks for your help!
0

#4 User is offline   queej 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 71
  • Joined: 04-February 10

Posted 03 March 2010 - 08:59 PM

Solved it! My 'modules' was indented one level too deep in the config array.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users