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
Page 1 of 1
Access Control Operations Menu Widget
#2
Posted 29 February 2012 - 12:02 PM
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,
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,
#3
Posted 10 July 2012 - 08:51 AM
Also interested the question
Now I do it so
but i think it's wrong.
Any ideas?
Now I do it so
<?php if ( Yii::app()->user->name == 'myname' ):?>
but i think it's wrong.
Any ideas?
Share this topic:
Page 1 of 1

Help











