Why seperate models and authentication?  What is wrong with basic role
based ACLs?   Makes more sense to me to use the one authentication
method and then use ACL for authorization.

Have a look at othAuth it is capable of group authentication.
http://bakery.cakephp.org/articles/view/othauth-0-5-documentation

Geoff
--
http://lemoncake.wordpress.com

On Jul 11, 7:19 am, Nik Chankov <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have following case:
> I have 2 sites admin and root (http://server/andhttp://server/admin/)
> For those 2 entry points I want to have 2 difefrent authentications
> stored in 2 complettely different models/controlers/views
> so for admin I used User model and all regular actions and views
> and for other I want to use Account model.
>
> well I had the code from other projects so I just copy and paste the
> files.
> and for /admin everything looked fine - once I authenticated
> everywhere I have seen $this->Session->read('User'); content properly.
>
> The problem is in Account - the external authentication.
>
> Well, I wanted the same authentication so I just copy and paste the
> code and I did required changes in it. I tested and everything goes
> fine until I wanted to change the controller.
> so I was onhttp://server/accounts/login/and all acions in accounts
> acts properly/
> then I tried to go tohttp://server/themes/index
> and I was surprised that I was redirected to the login url again. I
> entered the data and I got login normally. then I try to go again to
> the themes controler and I got redirect to login again.
>
> Strange enough, I check everything in the code and I found that the
> session variable "Account" which stores the record of the logged
> external user is available only in accounts controller. If I change
> the url the session id was differnet and of course the "Account"
> variable disappeared.
>
> I try to figure out where is the problem and my last try was to add
> login action and login.ctp view to the User controler. /untl that the
> controller contains only admin_* actions/ well I was surprised to find
> that once I was logged in throughhttp://server/users/loginI had
> login and $this->Session->read('User'); was visible everywhere in
> every controller.
>
> for sure it's not a ordinary problem like mispell controller or
> variable. it just don't store session variable different than set from
> User controller.
>
> So is this the usual behaviour, or I need to set somewhere that
> instead of user I am using different model for Authentication.
>
> Thanks in advance.
> Hope it' clear enough :)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to