I love @rbates CanCan ruby library for authorization. Was wondering if anything similar existed for python / flask ?
I guess there are three main requirements:
- simple declarative way of defining abilities (here is how CanCan does it)
- decorator for flask routes
- fine-grained way for checking abilities in other parts of the code. i.e.
if current_user.can('post::edit')
or something
Or, what is the one obvious way to do it? (PEP-20)
Current Options:
- Flask Simple Authorization (leaning towards something like this for now.)
- Flask Principal (They all feel a bit heavy weight to me)