migration/postcreate.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 21 Oct 2010 18:01:10 +0200
changeset 716 448d9fb3ae71
parent 528 92f09c79dad5
child 838 34086b680de3
child 887 fccb89f0745a
permissions -rw-r--r--
#1347584: when used as a tracker extension, should grant staff group the right to add/update repositories

# postcreate script. You could setup a workflow here for example

wf = add_workflow(u'Test configuration workflow', 'TestConfig')
activated = wf.add_state(_('activated'), initial=True)
deactivated = wf.add_state(_('deactivated'))
wf.add_transition(_('deactivate'), activated, deactivated,
                  requiredgroups=('managers',))
wf.add_transition(_('activate'), deactivated, activated,
                  requiredgroups=('managers',))

from cubes.apycot import recipes
recipes.create_quick_recipe(session)

if not config['pyro-server']:
    config.global_set_option('pyro-server', True)
    config.save()