fixed upgrade step
This commit is contained in:
parent
9a4e3718fc
commit
f67f12bd05
@ -55,11 +55,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"
|
||||
/>
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user