fixed upgrade step
This commit is contained in:
parent
920392d124
commit
770651cf72
@ -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"
|
||||
/>
|
||||
|
@ -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