Changeset 2614 in products
- Timestamp:
- Jul 5, 2010 5:33:43 PM (14 years ago)
- Location:
- quintagroup.gauth/trunk/quintagroup/gauth
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.gauth/trunk/quintagroup/gauth/configure.zcml
r2609 r2614 15 15 provides="Products.GenericSetup.interfaces.EXTENSION" 16 16 /> 17 18 <genericsetup:registerProfile 19 name="uninstall" 20 title="quintagroup.gauth" 21 directory="profiles/uninstall" 22 description="Uninstalls the quintagroup.gauth package" 23 provides="Products.GenericSetup.interfaces.EXTENSION" 24 /> 25 17 26 <!-- -*- extra stuff goes here -*- --> 18 27 -
quintagroup.gauth/trunk/quintagroup/gauth/setuphandlers.py
r2609 r2614 21 21 provided=IGAuthUtility) 22 22 logger.log(logging.INFO, "Registered IGAuthUtility, bound it to the site.") 23 24 25 def uninstallStuff(context): 26 if context.readDataFile('quintagroup_gauth_unisntall.txt') is None: 27 return 28 29 site = context.getSite() 30 unregisterUtility(site) 31 removeGauthProperties(site) 32 removeConfiglet(site) 33 removeActionIcons(site) 34 35 def unregisterUtility(site): 36 sm = getSiteManager(site) 37 existing = queryUtility(IGAuthUtility) 38 if existing is None: 39 logger.log(logging.WARN, "No GAuthUtility is registered.") 40 41 sm.unregisterUtility(component=existing, provided=IGAuthUtility) 42 logger.log(logging.INFO, "Unregistered IGAuthUtility, from local sitemanager.") 43 44 def removeGauthProperties(site): 45 pp = getToolByName(site, "portal_properties") 46 if not "gauth_properties" in pp.objectIds(): 47 logger.log(logging.WARN, "No 'gauth_properties' present in portal_properties.") 48 pp.manage_delObjects(ids="gauth_properties") 49 logger.log(logging.INFO, "Removed 'gauth_properties' from portal_properties.") 50 51 def removeConfiglet(site): 52 pcp = getToolByName(site, "portal_controlpanel") 53 if not "quintagroup.gauth" in pcp.objectIds(): 54 logger.log(logging.WARN, "No 'quintagroup.gauth' configlet.") 55 pcp.unregisterConfiglet("quintagroup.gauth") 56 logger.log(logging.INFO, "Removed 'quintagroup.gauth' configlet.") 57 58 def removeActionIcons(site): 59 pai = getToolByName(site, "portal_actionicons") 60 if not "quintagroup.gauth" in pai.objectIds(): 61 logger.log(logging.WARN, "No 'quintagroup.gauth' configlet.") 62 63 pai.manage_removeActionIcon(category="controlpanel", action_id="quintagroup.gauth") 64 logger.log(logging.INFO, "Removed 'quintagroup.gauth' action icon.")
Note: See TracChangeset
for help on using the changeset viewer.