Last change
on this file since 1187 was
656,
checked in by crchemist, 18 years ago
|
Added qPloneCaptchas properties in portal_properties.
|
-
Property svn:eol-style set to
native
|
File size:
1.1 KB
|
Rev | Line | |
---|
[1] | 1 | from Products.CMFCore.utils import getToolByName |
---|
| 2 | |
---|
[119] | 3 | def setupVarious(context): |
---|
| 4 | """Run the various non-Generic Setup profile import steps. |
---|
| 5 | """ |
---|
| 6 | if context.readDataFile('qPloneComments-default.txt') is None: |
---|
| 7 | return |
---|
[1] | 8 | |
---|
[119] | 9 | portal = context.getSite() |
---|
| 10 | logger = context.getLogger('qPloneComments') |
---|
[1] | 11 | |
---|
[119] | 12 | # Add 'DiscussionManagers' group |
---|
| 13 | gtool = getToolByName(portal, 'portal_groups') |
---|
[1] | 14 | existing = gtool.listGroupIds() |
---|
| 15 | if not 'DiscussionManager' in existing: |
---|
| 16 | gtool.addGroup('DiscussionManager', roles=['DiscussionManager']) |
---|
[119] | 17 | logger.info('Added DiscussionManager group to portal_groups with DiscussionManager role.') |
---|
[1] | 18 | |
---|
| 19 | # Remove workflow-chain for Discussion Item |
---|
[119] | 20 | wf_tool = getToolByName(portal, 'portal_workflow') |
---|
| 21 | wf_tool.setChainForPortalTypes(('Discussion Item',), []) |
---|
| 22 | logger.info('Removed workflow chain for Discussion Item type.') |
---|
[656] | 23 | |
---|
| 24 | def removeConfiglet(context): |
---|
| 25 | if context.readDataFile('qPloneComments-uninstall.txt') is None: |
---|
| 26 | return |
---|
| 27 | portal_conf=getToolByName(context.getSite(),'portal_controlpanel') |
---|
| 28 | portal_conf.unregisterConfiglet('prefs_comments_setup_form') |
---|
Note: See
TracBrowser
for help on using the repository browser.