Sunday, April 25, 2010

Re: Sometimes ACL is just too much

Clean your mind and try again.
ACL is more powerful and not more complicate then the proposed solutions in this thread.
Take the tutorial
http://book.cakephp.org/view/641/Simple-Acl-controlled-Application

As written in the Book
"Be brave and stick with it, even if the going gets rough. Once you get the hang of it, it's an extremely powerful tool to have on hand when developing your application."


On Sat, Apr 24, 2010 at 1:31 AM, paws_galuten <jason.galuten@gmail.com> wrote:
I wrestled with ACL for a while, and finally decided that might be too
much for what I'm doing. I only really need a few types of users and
in that case it is simple enough just to have a field in the users
table that specifies the type (or is a foreign key to the groups
table, for example).

This way, I can just use $this->Auth->user() to find out what type of
user is logged in, and then have different things happen in the view.

Here's a question... Now that I've simplified things and am not using
ACL, I still need to restrict access to the special actions. Do I need
to manually check the user in each action and redirect if they are not
supposed to acces it?

It seems like there are two things. 1, changing the view and making
certain actions visible to special user types, and 2, actually
restricting other users form those actions in case they manually type
them into the url.

I'm just trying to do the simplest thing while sticking with cake
conventions.
Thanks for your thoughts,
Jason

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en



--
Regards,
Zaky Katalan-Ezra
QA Administrator
www.IGeneriX.com
Sites.IGeneriX.com
054-7762312

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: