Hm, off the top of my head, if I understand correctly what you're asking: def user(): @decorator def myreg(): return dict(form=auth())
if 'register' in request.args: return myreg() return dict(fom=auth()) On Apr 22, 2:51 pm, vihang <vihan...@gmail.com> wrote: > how can I decorate the register function in the tools.Auth from the > application? > > Thanks > > On Apr 21, 3:08 pm, AchipA <attila.cs...@gmail.com> wrote: > > > You can call the decorator directly, or just wrap it in an internal > > func. > > > On Apr 21, 11:06 am, vihang <vihan...@gmail.com> wrote: > > > > Even better would be to be able to use decorators on it, like > > > @auth.requires_permission on register(). This may be asking too much, > > > but just wanted to see how much the auth module can be stretched > > > before one has to start tweaking the auth code... > > > > On Apr 21, 12:58 pm, vihang <vihan...@gmail.com> wrote: > > > > > I had a look at the auth code, but could not find any flags to disable > > > > registration. Is there a way I can do it my have something like > > > > auth.settings.register flag in the model with other settings?? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---