fixed upgrade step

This commit is contained in:
Andrea Cecchi 2014-03-03 16:15:12 +01:00
parent 920392d124
commit 770651cf72
2 changed files with 9 additions and 3 deletions

View File

@ -54,11 +54,11 @@
/>
<genericsetup:upgradeStep
title="delete own comments"
description="reload registry config to enable new field delete_own_comment_enabled"
title="delete comments"
description="reload rolemap config to enable new permission 'Delete comments'"
source="101"
destination="102"
handler=".upgrades.update_registry"
handler=".upgrades.update_rolemap"
sortkey="1"
profile="plone.app.discussion:default"
/>

View File

@ -2,7 +2,13 @@ from zope.component import getUtility
from plone.registry.interfaces import IRegistry
from plone.app.discussion.interfaces import IDiscussionSettings
default_profile = 'profile-plone.app.discussion:default'
def update_registry(context):
registry = getUtility(IRegistry)
registry.registerInterface(IDiscussionSettings)
def update_rolemap(context):
context.runImportStepFromProfile(default_profile, 'rolemap')