tingobol / yii-rights

Automatically exported from code.google.com/p/yii-rights
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Application authorization manager must extend the RDbAuthManager class. #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
How to setup rights only for a module?
I want to set up rights as a module under a module.

I've created the necessary setup but than I am told the above exception.

I have my main site login differently from the current module. How do I skip 
this important step?

Original issue reported on code.google.com by pentium10 on 24 Jan 2011 at 12:45

GoogleCodeExporter commented 9 years ago
Your authManager needs to be configured to use the "RDbAuthManager" instead of 
"CDbAuthManager" or "CPhpAuthManager".

As far as I know this is not an issue, closing this.

Original comment by Christof...@gmail.com on 29 Jan 2011 at 12:02

GoogleCodeExporter commented 9 years ago
Please read more carefully, I am talking about a 'module' only, can't change 
the application global configuration as that uses another built in 
authentication, I must set it only for this `module`.

There is definetly something missing. Did you understood?

Original comment by pentium10 on 29 Jan 2011 at 4:15

GoogleCodeExporter commented 9 years ago
I see what you mean. I'm not actually sure how you should do this. Maybe you 
could configure your module to use a different authorization manager?

After looking into this a bit more I'm actually starting to think that it might 
not be possible to use Rights for a single module after all. I only tried that 
it worked to have it nested but I actually didn't have a real situation so 
there might have been things that I overlooked.

Sorry for the inconvenience.

Original comment by Christof...@gmail.com on 29 Jan 2011 at 6:15

GoogleCodeExporter commented 9 years ago
Some other weird things do happen also. Let me explain.

Site fron-end uses a different login (although I had to setup to extend 
RDbAuthManager), the front-end login doesn't have "Remember me" option.
Front-end uses the default theme, there is no theme set for it.

Site back-end, admin module uses the rights authentication (a module in 
adminmodule), and the admin login has the option "Remember me". Backend uses a 
different theme, a dedicated theme "admin".

Now the problem is that if you visit the site after a while, for example the 
next day. And you had that remember me option checked on admin. When you access 
the front-end of the site, probably it detects that remember me option was 
active and logs you in (as admin), and the problem itself is that it shows the 
"admin" theme with the admin content, (index page) while you are still on the 
root of the site www.domain.com I need to reload the URL to get the proper 
layout for the front-end.

From what does this happen?

Original comment by pentium10 on 30 Jan 2011 at 11:00

GoogleCodeExporter commented 9 years ago
Now I see what you're trying to achieve.

The problem is that your application uses a shared web user for both the front- 
and back-end. I'm not sure if you can avoid the login problem, but you could 
always ask on the Yii forum.

I've thought about having the back-end as a separate module but I think it 
poses many potential problems. It all depends on the application but I'd rather 
have a separate application with shared functionality instead.

You can read more about this on a wiki entry written by Qiang himself here:
http://www.yiiframework.com/wiki/33/

Hope this helps.

Original comment by Christof...@gmail.com on 30 Jan 2011 at 1:01

GoogleCodeExporter commented 9 years ago
Closed due to inactivity.

Original comment by Christof...@gmail.com on 31 Mar 2011 at 9:31