Changeset 1149
- Timestamp:
- 06/29/08 20:34:04
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPloneComments/branches/plone-3.0/Extensions/Install.py
r1139 r1149 1 1 from StringIO import StringIO 2 2 from Products.CMFCore.utils import getToolByName 3 from Products.CMFCore.permissions import ManagePortal,ReplyToItem3 from Products.CMFCore.permissions import ReplyToItem 4 4 5 5 from Products.qPloneComments.config import * … … 14 14 # Tern on Anonymous commenting 15 15 self.manage_permission(ReplyToItem, ['Anonymous','Manager','Member'], 1) 16 17 # Add Configlet. Delete old version before adding, if exist one.18 controlpanel_tool = getToolByName(self, 'portal_controlpanel')19 controlpanel_tool.unregisterConfiglet(CONFIGLET_ID)20 controlpanel_tool.registerConfiglet(id=CONFIGLET_ID, name=CONFIGLET_NAME, category='Products',21 action='string:${portal_url}/%s' % CONFIGLET_ID,22 appId=PROJECTNAME, permission=ManagePortal, imageUrl='group.gif')23 16 24 17 uf = getToolByName(self, 'acl_users') … … 47 40 48 41 def uninstall(self): 42 out = StringIO() 49 43 50 # Remove configlet 44 # Remove configlet, as there's currently no support to do it via GS 51 45 controlpanel_tool = getToolByName(self, 'portal_controlpanel') 52 controlpanel_tool.unregisterConfiglet(CONFIGLET_ID) 46 controlpanel_tool.unregisterConfiglet('prefs_comments_setup_form') 47 out.write('Removed the product configlet.\n') 48 return out.getvalue()
