title: Yii, item in menu only available for admins
body: <p>i want to make a menu to be only available for admins, for now i have this code and show you in the code what i want to change</p>
  
  <pre><code>&lt;?php
  if(Yii::app()-&gt;user-&gt;name = 'admin') //for now i use this to be rendered only if the name of the user is admin, but i want to change it to be available for everyone who are admin.
  {   
      $this-&gt;widget('bootstrap.widgets.TbNavBar',array(
          'brandLabel'=&gt;TbHtml::b(Yii::app()-&gt;name),
          'color'=&gt;TbHtml::NAVBAR_COLOR_INVERSE,
          'items'=&gt;array(
              array(
                  'class'=&gt;'bootstrap.widgets.TbNav',
                  'items'=&gt;array(
                      array('label'=&gt;'Home', 'url'=&gt;array('/site/index')),
                      array('label'=&gt;'About', 'url'=&gt;array('/site/page', 'view'=&gt;'about')),
                      array('label'=&gt;'Contact', 'url'=&gt;array('/site/contact')),
                      array('label'=&gt;'Users', 'url'=&gt;array('/user/index')),
                  ),
              ),
              array(
                  'class'=&gt;'bootstrap.widgets.TbNav',
                  'htmlOptions'=&gt;array('class'=&gt;'pull-right'),
                  'items'=&gt;array(
                      array('label'=&gt;'Login', 'url'=&gt;array('/site/login'), 'visible'=&gt;Yii::app()-&gt;user-&gt;isGuest),
                      array('label'=&gt;'Logout ('.Yii::app()-&gt;user-&gt;name.')', 'url'=&gt;array('/site/logout'), 'visible'=&gt;!Yii::app()-&gt;user-&gt;isGuest)
                  ),
              ),
          ),
      )); 
  }
  else
  {
      $this-&gt;widget('bootstrap.widgets.TbNavBar',array(
          'brandLabel'=&gt;TbHtml::b(Yii::app()-&gt;name),
          'color'=&gt;TbHtml::NAVBAR_COLOR_INVERSE,
          'items'=&gt;array(
              array(
                  'class'=&gt;'bootstrap.widgets.TbNav',
                  'items'=&gt;array(
                      array('label'=&gt;'Home', 'url'=&gt;array('/site/index')),
                      array('label'=&gt;'About', 'url'=&gt;array('/site/page', 'view'=&gt;'about')),
                      array('label'=&gt;'Contact', 'url'=&gt;array('/site/contact')),
                  ),
              ),
              array(
                  'class'=&gt;'bootstrap.widgets.TbNav',
                  'htmlOptions'=&gt;array('class'=&gt;'pull-right'),
                  'items'=&gt;array(
                      array('label'=&gt;'Login', 'url'=&gt;array('/site/login'), 'visible'=&gt;Yii::app()-&gt;user-&gt;isGuest),
                      array('label'=&gt;'Logout ('.Yii::app()-&gt;user-&gt;name.')', 'url'=&gt;array('/site/logout'), 'visible'=&gt;!Yii::app()-&gt;user-&gt;isGuest)
                  ),
              ),
          ),
      ));
  } 
  ?&gt;
  </code></pre>
  
  <p>im using (if) for each widget if the condition returns true, but what i want to change is.. the menu "user", to be only rendered for everyone thats admin, if not then not render and deny access.</p>