本文整理汇总了Python中Products.DCWorkflow.Guard.Guard.groups方法的典型用法代码示例。如果您正苦于以下问题:Python Guard.groups方法的具体用法?Python Guard.groups怎么用?Python Guard.groups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products.DCWorkflow.Guard.Guard
的用法示例。
在下文中一共展示了Guard.groups方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: clone_transition
# 需要导入模块: from Products.DCWorkflow.Guard import Guard [as 别名]
# 或者: from Products.DCWorkflow.Guard.Guard import groups [as 别名]
def clone_transition(transition, clone):
transition.description = clone.description
transition.new_state_id = clone.new_state_id
transition.trigger_type = clone.trigger_type
if clone.guard:
guard = Guard()
guard.permissions = clone.guard.permissions[:]
guard.roles = clone.guard.roles[:]
guard.groups = clone.guard.groups[:]
transition.guard = guard
transition.actbox_name = transition.title
transition.actbox_url = clone.actbox_url.replace(clone.id, transition.id)
transition.actbox_category = clone.actbox_category
transition.var_exprs = clone.var_exprs
transition.script_name = clone.script_name
transition.after_script_name = clone.after_script_name