Yii Framework Forum: Rights Module Assign Role - Yii Framework Forum

Jump to content

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

Rights Module Assign Role Rights module assign role Rate Topic: ***** 1 Votes

#1 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 884
  • Joined: 20-April 11
  • Location:India

Posted 30 October 2012 - 12:46 AM

When i am assigning a role to a user like

Rights::assign('parent', $user->id);



this is not only giving "parent" role but also giving all the roles to the user.

any solution?
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#2 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 884
  • Joined: 20-April 11
  • Location:India

Posted 30 October 2012 - 12:50 AM

got solution

$authorizer = Yii::app()->getModule("rights")->getAuthorizer();
$authorizer->authManager->assign('parent', $user->id);



this is working.
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#3 User is offline   devnew 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 05-March 13

Posted 10 April 2013 - 04:54 AM

Dear Rajith,

Need you help, can you please guide what missing in the rights module implementation .

Have installed users and rights module, working gr8!

After installation, removed default access rules from controller, created role with multiple tasks and operations but when that role assigned to user, it does not work.

for example, I have created sub-admin role to let user add,create users but can not delete them but that assignment not seems to be working.

thanks in advance.
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