fixed upgrade step
This commit is contained in:
parent
920392d124
commit
770651cf72
@ -54,11 +54,11 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<genericsetup:upgradeStep
|
<genericsetup:upgradeStep
|
||||||
title="delete own comments"
|
title="delete comments"
|
||||||
description="reload registry config to enable new field delete_own_comment_enabled"
|
description="reload rolemap config to enable new permission 'Delete comments'"
|
||||||
source="101"
|
source="101"
|
||||||
destination="102"
|
destination="102"
|
||||||
handler=".upgrades.update_registry"
|
handler=".upgrades.update_rolemap"
|
||||||
sortkey="1"
|
sortkey="1"
|
||||||
profile="plone.app.discussion:default"
|
profile="plone.app.discussion:default"
|
||||||
/>
|
/>
|
||||||
|
@ -2,7 +2,13 @@ from zope.component import getUtility
|
|||||||
from plone.registry.interfaces import IRegistry
|
from plone.registry.interfaces import IRegistry
|
||||||
from plone.app.discussion.interfaces import IDiscussionSettings
|
from plone.app.discussion.interfaces import IDiscussionSettings
|
||||||
|
|
||||||
|
default_profile = 'profile-plone.app.discussion:default'
|
||||||
|
|
||||||
|
|
||||||
def update_registry(context):
|
def update_registry(context):
|
||||||
registry = getUtility(IRegistry)
|
registry = getUtility(IRegistry)
|
||||||
registry.registerInterface(IDiscussionSettings)
|
registry.registerInterface(IDiscussionSettings)
|
||||||
|
|
||||||
|
|
||||||
|
def update_rolemap(context):
|
||||||
|
context.runImportStepFromProfile(default_profile, 'rolemap')
|
||||||
|
Loading…
Reference in New Issue
Block a user