Access Control Operations Menu Widget

I’m a relative newbie to Yii and so this might be a better job for someone else, but I wanted to make a dynamic “Operations” menu widget, similar to the one that is included in the CRUD operations and the basic Yii application template. The difference is that I want mine to be based off of the accessRules as defined in the controller. The idea would be that if the current user has access to a particular action based on those rules, then that menu item would appear, otherwise it wouldn’t. I hope this is understandable. If not please let me know and I will attempt to clarify. Thanks for any help in advance. -Brian

Anybody knows how can i force that?

I would like to use access control for the operations widget…i want to show it in case the user is logged and he can do any operation…is it possible?

thanks in advance.

Hibernator,

Also interested the question

Now I do it so


<?php if ( Yii::app()->user->name == 'myname' ):?>

but i think it’s wrong.

Any ideas?