[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread Tony Piper
On Feb 9, 12:07 pm, wueb wrote: > Thank you very much Gábor and Tony. > > Only 2 things Tony. > > First - that findOwned method is called when? When i make $this->leads > = $this->getRoute()->getObject(); ? I'm fairly sure it's as the route is processed, not when the getObject is fetched. > >

[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread wueb
Yeah, i use the $this->getUser() (action) and the $sf_user (template) already. But now i need use it on the LeadsTable.class.php and none of that works. Cheers -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email

Re: [symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread Gábor Fási
No, it gets called while in the routing process - after the request uri has been matched to a route, a database call is made to retrieve the matching object. Use $this->getUser() in your action, $sf_user in your template. On Tue, Feb 9, 2010 at 13:07, wueb wrote: > Thank you very much Gábor and T

[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread wueb
Thank you very much Gábor and Tony. Only 2 things Tony. First - that findOwned method is called when? When i make $this->leads = $this->getRoute()->getObject(); ? Second - i always read make sfContext::getInstance()->getUser()- >getGuardUser()->getId()); is not very recommended because the conte

[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread wueb
Thank you very much Gábor and Tony. Only 1 thing Tony, that findOwned method is called when? When i make $this->leads = $this->getRoute()->getObject(); ? Cheers. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send emai

[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread Tony Piper
Or, you could create new 'finder' methods in your model table class that find only records owned by the current user. This example assumes you're using Doctrine, but there should be an equivalent in Propel. You specify these methods in your routine.yml; leads: class: sfDoctrineRouteCollectio

[symfony-users] Re: Edit/Show - protect against non permission access

2010-02-09 Thread wueb
No one? I'm the first having this problem? :( -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegr