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
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!
2 matches
Mail list logo