[EXTENSION] Rights

Hi, try to change yii::app() to Yii::app().

If it doesn’t work, try to debug your app or, even simpler, put something like die(var_dump($params[‘company’])) inside the bizrule. I have done some fast tests this way and I could find the params are received ok.

Just one more point: maybe you have some accessRules in your controller conflicting your rights filter. Check that or try to remove it to make some tests.

PS: By the way, I dont celebrate holydays.

Hello all,

I have a question maybe you could help me.

I am using the RController to make the things easier so that i dont need to checkAccess() in everywhere. But i have some situations that i need to get params from action to check permissions.

The question is: how can i send those params to checkAccess() if the filter of righst is runned before my action itself? The filter makes the checkAcces return false cause the params are not setted.

What am I doing wrong? How do you acomplish this type of task?

— Edit: —

I know if I dont use RController, all the checkAccess() would have to be by my account. But i would like to know how to use both. It would make the things so easier.

Hi all,

I often encounter Rights error and forget how to fix it although I ever solved it before. And everytime I search in the forum, it is far more difficult. Why? Because this thread always keep growing :D Well that’s a good sign because it means a lot of people using Rights doesn’t it?

But it is not good for me when I am encounter old problem :(

So, I decided to create a wiki to collect all the common problems usually we encountered in Rights extension. This way a Rights newbie user or me can easily find the solution for common problem. I am in the middle gathering the solutions, feel free to take a look. Thank you.

Troubleshotting Rights Extension

Greate idea,¨bookmarked immeadetly because I’m just like you when it comes to remember solutions:p

Rights really is a first class extension.

I’ve been trying to make Yum and Rights work together for the last 4 days. I’ve managed to get both of them working by themselves, but never together completely.

So I would appreciate any help I can get on how to configurate Yum to make it work with the rights rbac module.

This is the only thing I’ve managed to trace down myself, Yum wants me to use this setting:


'components'=>array(

		'user'=>array(

			'class' => 'application.modules.user.components.YumWebUser',

But rights demands that I use ‘class’=>‘RWebUser’;

I suspect there is more things that has to be modified but I’m not experienced enough to figure it out,only used yii for a couple of weeks, don’t know so much about how it works.

I’ve heard about people using both so I know it is Possible but cannot find a step-for-step guide, only solutions for one or two problems.

(it would be so amazing with a blog demo with both installed).

Thank you!

Chris, are you thinking of making a version of rights using your bootstrap theme extension?

Hi,

Just would like you to know I’ve created an extension to autocheck permissions and automagically show/hide ©menu items.

Could be used, for example, in //layout/main menu, //layouts/column2 operations menu or for any other cmenu.

I am posting this here `cause that extension works out-of-the-box with Rights.

YiiSmartMenu:

http://www.yiiframework.com/extension/yiismartmenu/

Hi,

I want to setup rights module inside another module.In my project two type of users, guests and system administrators. I developed system administration as a separate module and want to setup "rights" module inside it.Does any one done such thing before, or is there any post regarding it.Your help is very much appreciated.

Thanks

Aruna

Hi… I have a newbie question. How do I run the installer for Rights?

Thank you for your help, and this very nice looking extension.

Hi everyone. I have pretty much the same problem as this one http://www.yiiframework.com/forum/index.php?/topic/10556-extension-rights/page__view__findpost__p__79125. I want do dynamically assign access to the rights module itself. In the link it says I should create Operation/Tasks for rights. However it seems that right itself doesn’t use these access methods at all, because when I look at AssignmentController the filters() method says “accessControl” and not “rights”.

don’t understand the operation of rights:

-1-I have two users (user-A;user-B )

-2-I created two roles (role_for-A;role_for-B )

-3-In ‘permissions’ I generate items for controller actions (controller/action)

for role-A (assigned) for role-B (not) why they both access the same controller/action ? :angry:

thanks

Have you removed the default ‘accessRules’ and ‘filters’ of your controller?

Yii scaffolding creates controllers that use them. If you dont remove them, they take precedence in relation to the rights’ access rules.

Ok thanks … this was not written in the guide, I read about RController but not this, so I have to remove those two functions ?! And all it’s ok ?

many thanks ::)

don’t work, I have attached an image of the rights panel… One role with permission on controller, all access to it !! What’s wrong? ???

thanks

2480

rights-issue.jpg

Hi locomo where did you find how to define “business rules” documentation is very poor ?! :(

thanks

Thank you,

It took me :

  • Many times reading the Rights-doc (7 first pages).

  • 238 messages ::) :-[.

  • Too much back and forth between the doc and google translate.

  • A bit of patience.

to get my first green message!!

seen better then that??!! hein ???:) .

Amazing job you have done here.

I go back O0 still have to enjoy the 7 next pages and definitely more. (inchaALLAH)

try this:

http://www.yiiframework.com/doc/guide/1.1/en/topics.auth#using-business-rules

I’ve installed rights on two diffrent projects. locally everything works but,

Online I can reach /rights/assignments/view but I get a 404 on permissions,roles,tasks,operations.

Like this:

Unable to resolve the request "rights/AuthItem/permissions".

Now locally I have localhost/appName/rights and its a windows server.

On my webhost I have domain.com/rights and its a linux server.

This applies for both projects so I feel pretty sure it has to be something related to the conditions above…

I’ve looked thrue the rights files but no where have I been able to find a case sensetive issue or url problem. But my knowledge on what could cause this behaviour is extremely limited…

Any Ideas?

Spanish translation.

Hi, Chris.

Attached you’ll find the spanish translation for 1.3.0

Regards.

Hi Paskuale,

Have u overcome this issue,

If S means, how did you overcome it.

Pls reply, i’m also having the same issue.

Thanks,

Srinivasan