Change teh behaviour with this: auth.settings.on_failed_authorization = lambda or function auth.settings.on_failed_authentication = lambda or function
On Mon, Oct 17, 2011 at 2:23 AM, Ray (a.k.a. Iceberg) <[email protected]>wrote: > Hi there, > > Following code works in web2py 1.98.2. That is, to allow registered > users, as well as the system administrator (who always access the > system from localhost), to access data. > > @auth.requires(request.client=='127.0.0.1' or auth.is_logged_in()) > def secret(): > return {"": "some cool stuff"} > > The snippet does not work in web2py 1.99.3. Looks like web2py 1.99.x > enforces user login in auth.requires(...). Should it be? > > Any feedback is welcome. > > Regards, > Ray (a.k.a. Iceberg) > -- -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] [ Aprenda a programar: http://CursoDePython.com.br ] [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ] [ Consultoria em desenvolvimento web: http://www.blouweb.com ]

