Yii Framework Forum: Rights With Yii-User-Management - Yii Framework Forum

Jump to content

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

Rights With Yii-User-Management

#1 User is offline   zhtoosi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 45
  • Joined: 30-April 13

Posted 15 July 2013 - 02:28 AM

I'd like to set up yii-user-management module with rights module. I have installed rights modules, and it is working, I installed yum module and it is also working. I generated all operations for yum module in rights interface. Everything seems to be ok, roles are assigned to users, but I always get 403 error "You are not authorized to perform this action.".
Probably there is some kind of conflict between yum role system and rights. I tried to install yum without role module but it does not work. Has anyone already set yum with rights? IF so please let me know what should i change.
0

#2 User is offline   zhtoosi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 45
  • Joined: 30-April 13

Posted 17 July 2013 - 01:05 AM

must be change in protected/modules/user/components/YumWebUser.php
first line:class YumWebUser extends CWebUser to class YumWebUser extends RWebUser
0

#3 User is offline   Ravi_Hirani 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 27-February 13

Posted 06 August 2013 - 08:03 AM

You can Set Authorization by Controller.
Your every controllers contain this kind of code.

public function accessRules()
{
return array(

array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('create','update','index','view'),
'users'=>array('@'),
),
array('allow', // allow admin user to perform 'admin' and 'delete' actions
'actions'=>array('admin','delete'),
'users'=>array('admin'),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
}

here @ is a authenticated user.
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