次のaccessRulesを持つコントローラーがあります:
  public function accessRules()
  {
    return array(
      array('allow',
        'actions'=>array('login','logout'),
        'users'=>array('*'),
      ),
      array('allow',
        'actions'=>array('index'),
        'users'=>array('@'),
      ),
      array('allow',
        'actions'=>array('users'),
        'expression'=>'$user->getState(\'role\')==0',
      ),
      array('deny',
        'users'=>array('*'),
      ),
    );
  }
アクション()メソッドで指定された(すべてのコントローラーの)すべてのアクション:
  public function actions()
  {
    return array(
      'index'=>$this->module->getName().'.controllers.main.IndexAction',
      'login'=>$this->module->getName().'.controllers.main.LoginAction',
      'logout'=>$this->module->getName().'.controllers.main.LogoutAction',
    );
  }
現在のユーザー権限に応じてコントローラー/アクションリストを取得する機会はありますか?すべてのコントローラーとそのアクションのリストを含むナビゲーションメニューを作成したいのですが、次のようになります。
- Controler1 (show only if current user have permissions to access it)- Controler1 / action1 (show only if current user have permissions to access it)
- Controler1 / action2 (show only if current user have permissions to access it)
 
- Controler1 / action1 
- Controller2 (show only if current user have permissions to access it)- Controler2 / action1 (show only if current user have permissions to access it)
- Controler2 / action2 (show only if current user have permissions to access it)
 
- Controler2 / action1