Re: [web2py] Re: hide functionality from non authenticated users

2011-11-15 Thread Kenneth Lundström
I think it is safe but maybe waste of resources so send it to view if not needed. Kenneth If c is for example a form is it safe to return it but not display it in the view?? On Nov 15, 2:01 pm, Anthony wrote: You can test for a logged in user via: if auth.user: auth.user is the reco

[web2py] Re: hide functionality from non authenticated users

2011-11-15 Thread thodoris
If c is for example a form is it safe to return it but not display it in the view?? On Nov 15, 2:01 pm, Anthony wrote: > You can test for a logged in user via: > >     if auth.user: > > auth.user is the record of the currently logged in user, or None if the > user is not logged in. > > Also, do y

[web2py] Re: hide functionality from non authenticated users

2011-11-15 Thread Anthony
You can test for a logged in user via: if auth.user: auth.user is the record of the currently logged in user, or None if the user is not logged in. Also, do you need to do something with the value of "c" in the logged in case? If not, then just test for a logged in user directly in the vie

Re: [web2py] Re: hide functionality from non authenticated users

2011-11-15 Thread Kenneth Lundström
Looks like a quite clean way. Kenneth There is nothing wrong, i just want to know if this is a "clean" way to do what i do above or there is a better way. Thodoris On Nov 15, 1:26 pm, Kenneth Lundström wrote: Whats wrong in what you just described? {{if c != None:}} Kenneth I want

[web2py] Re: hide functionality from non authenticated users

2011-11-15 Thread thodoris
There is nothing wrong, i just want to know if this is a "clean" way to do what i do above or there is a better way. Thodoris On Nov 15, 1:26 pm, Kenneth Lundström wrote: > Whats wrong in what you just described? > > {{if c != None:}} > > Kenneth > > > > > > > > > I want to do the following > >