In message <[EMAIL PROTECTED]>, Gerardo
Herzig wrote:

> @is_logued_in
> def change_pass():
>     bla
>     bla
> 
> And so on for all the other functions who needs that the user is still
> loged in.

My suspicion is that most of the methods in your session object (with the
obvious exception of the login method) will require the user to be logged
in, right?

So the trouble with an extra decorator like this, is that you have to
remember to put it on nearly _all_ your methods.

Wouldn't it be simpler and safer to default the other way? Have some way of
saying "doesn't require user to be logged in", and require a valid
logged-in session on all methods where this is not specified?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to