【发布时间】:2013-06-07 11:36:30
【问题描述】:
我喜欢 @rbates CanCan 用于授权的 ruby 库。想知道 python / flask 是否存在类似的东西?
我猜主要有三个要求:
- 定义能力的简单声明方式 (here is how CanCan does it)
- 烧瓶路线的装饰器
- 检查代码其他部分能力的细粒度方法。即
if current_user.can('post::edit')之类的
Or, what is the one obvious way to do it? (PEP-20)
当前选项:
- Flask Simple Authorization(目前倾向于这样的事情。)
- Flask Principal(他们都觉得我有点重)
【问题讨论】:
标签: python authentication authorization flask