Yii Framework Forum: Access Control Operations Menu Widget - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Access Control Operations Menu Widget Rate Topic: -----

#1 User is offline   Brian Louis 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 16-June 10

Posted 22 October 2011 - 10:02 AM

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
0

#2 User is offline   hibernator 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 20-February 12

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,
0

#3 User is offline   fad 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 04-June 12
  • Location:Russia

Posted 10 July 2012 - 08:51 AM

Also interested the question

Now I do it so
<?php if ( Yii::app()->user->name == 'myname' ):?>

but i think it's wrong.

Any ideas?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users