[web2py] access auth in modules

2011-12-29 Thread lyn2py
In controllers, it would look like: @auth.requires_login() def function(): pass How do I implement requires_login (and other auth decorators) correctly in module methods that require access control? Thanks!

Re: [web2py] access auth in modules

2011-12-29 Thread Bruno Rocha
Access control decorators are designed to work in controller actions only, because actions define workflow of the application, even if you have code in modules, the action is what your user will call. But, you can always use other methods to check permissions etc.. in modulesyou can do [ auth.has