Problem to access controllers

I’m a newie in Yii and I really want to know how to get and action across another controller different of “SiteController” controller.

I have a controller named "MyUsersControllers" and my menu has an entry like this:

<?php $this->widget(‘application.components.MainMenu’,array(

			'items'=&gt;array(


				array('label'=&gt;'Home', 'url'=&gt;array('/site/index')),


				array('label'=&gt;'Contact', 'url'=&gt;array('/site/contact')),		


				[b]array('label'=&gt;'Users', 'url'=&gt;array('/[i]users[/i]/show')),[/b]


			)); ?&gt;

The problem is that I get an error page because my application never find (or never decide to use) UsersControllers.

The default controller is always "SiteController".

How or where should I define or configure an entry to my own controller to be access by my application?

There is config file where I should to define a route to my controllers?

How should I to configure it?

I think you would benefit from reading the explanation near the end of this page:

http://www.yiiframework.com/doc/guide/basics.mvc

If you specify "users" in the route, your controller class is expected to be UsersController (in the file UsersController.php).

/Tommy

thanks a lot I already found the error. The route to "show" was not correct I really should to put "users/list" in my menu entry to access.

I have ahother question. To control the access to this list I put this:

array(‘label’=>‘Users’, ‘url’=>array(’/users/admin’),‘visible’=>Yii::app()->user->checkAccess(‘listUsers’))

and in my "UsersController" I have a rule where just admin user can see the users list:

public function accessRules()

   {


       return array(


           array('allow',  // allow all users to perform 'list' and 'show' actions


               'actions'=&gt;array('list','show'),


               'users'=&gt;array('admin'),

but even where I’m loging as admin, I never see the link to access the users list.

Should I to configure another thing?

I suspect you haven’t implemented rbac/acl component or defined any access hierarchy or anything like that

thanks for you answer. should be a problem with my rbac because I coould not execute my script with all permission, so I excecuted it directely to save the roles inside de database. I’m using CDbAuthmanager. I really would like to know how to work with rbac because the command doesn’t work for me. till now, I’m enter all roles, operations and task directly, executing my script as parte of my site.

I’m yet to do anything with Yii RBAC yet so i’m not sure i can help much but you could check out this extension http://www.yiiframework.com/extension/srbac/ additionally you can check out the access control implementation in http://code.google.com/p/yii-skeleton-app/ and if you haven’t checked out the doc on auth, you should read and see what you get from this http://www.yiiframework.com/doc/guide/topics.auth