本文整理汇总了Python中ckan.authz.Authorizer.am_authorized方法的典型用法代码示例。如果您正苦于以下问题:Python Authorizer.am_authorized方法的具体用法?Python Authorizer.am_authorized怎么用?Python Authorizer.am_authorized使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ckan.authz.Authorizer
的用法示例。
在下文中一共展示了Authorizer.am_authorized方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: am_authorized
# 需要导入模块: from ckan.authz import Authorizer [as 别名]
# 或者: from ckan.authz.Authorizer import am_authorized [as 别名]
def am_authorized(c, action, domain_object=None):
''' Deprecated. Please use check_access instead'''
from ckan.authz import Authorizer
if domain_object is None:
from ckan import model
domain_object = model.System()
return Authorizer.am_authorized(c, action, domain_object)
示例2: am_authorized
# 需要导入模块: from ckan.authz import Authorizer [as 别名]
# 或者: from ckan.authz.Authorizer import am_authorized [as 别名]
def am_authorized(c, action, domain_object=None):
from ckan.authz import Authorizer
if domain_object is None:
from ckan import model
domain_object = model.System()
return Authorizer.am_authorized(c, action, domain_object)