Exemplo n.º 1
0
def evolve(context):
    root = find_root(context)
    searcher = ICatalogSearch(root)
    total, docids, resolver = searcher(interfaces=[IForumTopic])
    count = 0
    workflow = get_workflow(IForumTopic, 'security')
    for docid in docids:
        topic = resolver(docid)
        if has_custom_acl(topic):
            continue # don't mess with objects customized via edit_acl
        try:
            state, msg = workflow.reset(topic)
        except:
            print "ERROR while resetting topic workflow: %s" % model_path(topic)
        else:
            print "Reset topic workflow: %s" % model_path(topic)
            count += 1
    print "Updated %d forum topic workflows" % count
Exemplo n.º 2
0
def evolve(context):
    root = find_root(context)
    searcher = ICatalogSearch(root)
    total, docids, resolver = searcher(interfaces=[IForumTopic])
    count = 0
    workflow = get_workflow(IForumTopic, 'security')
    for docid in docids:
        topic = resolver(docid)
        if has_custom_acl(topic):
            continue  # don't mess with objects customized via edit_acl
        try:
            state, msg = workflow.reset(topic)
        except:
            print "ERROR while resetting topic workflow: %s" % resource_path(
                topic)
        else:
            print "Reset topic workflow: %s" % resource_path(topic)
            count += 1
    print "Updated %d forum topic workflows" % count
Exemplo n.º 3
0
 def _callFUT(self, ob):
     from karl.security.workflow import has_custom_acl
     return has_custom_acl(ob)
Exemplo n.º 4
0
Arquivo: tests.py Projeto: lslaz1/karl
 def _callFUT(self, ob):
     from karl.security.workflow import has_custom_acl
     return has_custom_acl(ob)