I have RBAC installed and working for individual pages.
I am using yii-Bootstrap to generate my menus.
I want to have Menu options based on Roles.
So within the items for TbNavBar I have this:
array('label'=>'Guest', 'visible'=>Yii::app()->user->isGuest, 'url'=>'#', 'items'=>array( array('label'=>'Shows', 'url'=>array('/show/view')), array('label'=>'Register', 'url'=>array('/site/registration')),
which works for people not signed in.
I want to do something similar for a user signed in who has the role of Secretary such as the menu is:
array('label'=>'Secretary', 'url'=>'#', 'items'=>array( array('label'=>'Classes', 'url'=>array('/Section/admin')), array('label'=>'Shows', 'url'=>array('/Show/admin')),
Now I know I need to add a 'visible' element, as done above, but do I need to write a function to do this or is there an RBAC function already that I can call?
Or is there something that I am missing.