Re: Edit only your entry
Hey, try this: debug($this-Auth-user()); die; it will print out everything about the current user, so I am pretty sure you will find out how to adjust your application. Cheers, Faifas On Tue, Mar 17, 2009 at 21:42, Dave d...@widepixels.com wrote: Can someone point me in the direction on how I would check if a logged in user could access specific actions in a controller. I am using ACL and AUTH (ACL has 3 groups admin, managers, employers, ) Now when a user is created they are either a manager or employer as admin is not an option obviously Now using ACL employers can access view action and edit action for example...but i want to set it up so they only view or edit their ownsame goes for the other parts of the site in different areas. I just need some help starting on determining if the page belongs to the current logged in user, if so allow, if not deny type of thing. Thanks --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Edit only your entry
Thanks guys. Using what you sent I got it going in the right direction now. Dave _ From: Aivaras [mailto:faifas1...@gmail.com] Sent: March-17-09 9:04 PM To: cake-php@googlegroups.com Subject: Re: Edit only your entry Hey, try this: debug($this-Auth-user()); die; it will print out everything about the current user, so I am pretty sure you will find out how to adjust your application. Cheers, Faifas On Tue, Mar 17, 2009 at 21:42, Dave d...@widepixels.com wrote: Can someone point me in the direction on how I would check if a logged in user could access specific actions in a controller. I am using ACL and AUTH (ACL has 3 groups admin, managers, employers, ) Now when a user is created they are either a manager or employer as admin is not an option obviously Now using ACL employers can access view action and edit action for example...but i want to set it up so they only view or edit their ownsame goes for the other parts of the site in different areas. I just need some help starting on determining if the page belongs to the current logged in user, if so allow, if not deny type of thing. Thanks --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---