示例#1
0
文件: evolve35.py 项目: cguardia/karl
def evolve(site):
    offices = site.get('offices')
    if offices is None:
        return

    for doc in postorder(offices):
        if hasattr(doc, '__custom_acl__'):
            continue

        try:
            ct = get_content_type(doc)
        except:
            continue

        if ct is None:
            continue

        wf = get_workflow(ct, 'security', doc)
        if wf is None:
            continue

        if wf.name != 'intranet-content':
            continue

        print 'Resetting workflow for', model_path(doc)
        wf.reset(doc)

    _reindex(offices)
示例#2
0
文件: evolve35.py 项目: iotest3/new
def evolve(site):
    offices = site.get('offices')
    if offices is None:
        return

    for doc in postorder(offices):
        if hasattr(doc, '__custom_acl__'):
            continue

        try:
            ct = get_content_type(doc)
        except:
            continue

        if ct is None:
            continue

        wf = get_workflow(ct, 'security', doc)
        if wf is None:
            continue

        if wf.name != 'intranet-content':
            continue

        print 'Resetting workflow for', resource_path(doc)
        wf.reset(doc)

    _reindex(offices)
示例#3
0
 def _callFUT(self, *arg, **kw):
     from karl.workflow import _reindex
     return _reindex(*arg, **kw)
示例#4
0
 def _callFUT(self, *arg, **kw):
     from karl.workflow import _reindex
     return _reindex(*arg, **kw)