Sunday, April 24, 2011

Re: Allowing rights to their own records only for users and admin.

Try to use beforeFind & afterFind
http://book.cakephp.org/view/1049/beforeFind

-check if a user logged in
-check if a user is admin or author (user_id)
-if is not admin or post author redirect and show error message, else
allow to manage post.

in views show links for authors and admin, hide for other...

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


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

No comments: