| Revision 194,
1.3 KB
checked in by takanori, 4 years ago
(diff) |
|
move directory
|
| Line | |
|---|
| 1 | # -*- coding: utf-8 -*- |
|---|
| 2 | # |
|---|
| 3 | # File: setuphandlers.py |
|---|
| 4 | # |
|---|
| 5 | # Copyright (c) 2008 by ['takanori', 'yuta'] |
|---|
| 6 | # Generator: ArchGenXML Version 2.1 |
|---|
| 7 | # http://plone.org/products/archgenxml |
|---|
| 8 | # |
|---|
| 9 | # GNU General Public License (GPL) |
|---|
| 10 | # |
|---|
| 11 | |
|---|
| 12 | __author__ = """takanori <takanori@takanory.net>, yuta <unknown>""" |
|---|
| 13 | __docformat__ = 'plaintext' |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | import logging |
|---|
| 17 | logger = logging.getLogger('ATGoogleMaps: setuphandlers') |
|---|
| 18 | from Products.ATGoogleMaps.config import PROJECTNAME |
|---|
| 19 | from Products.ATGoogleMaps.config import DEPENDENCIES |
|---|
| 20 | import os |
|---|
| 21 | from Products.CMFCore.utils import getToolByName |
|---|
| 22 | import transaction |
|---|
| 23 | ##code-section HEAD |
|---|
| 24 | ##/code-section HEAD |
|---|
| 25 | |
|---|
| 26 | def isNotATGoogleMapsProfile(context): |
|---|
| 27 | return context.readDataFile("ATGoogleMaps_marker.txt") is None |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | def updateRoleMappings(context): |
|---|
| 32 | """after workflow changed update the roles mapping. this is like pressing |
|---|
| 33 | the button 'Update Security Setting' and portal_workflow""" |
|---|
| 34 | if isNotATGoogleMapsProfile(context): return |
|---|
| 35 | wft = getToolByName(context.getSite(), 'portal_workflow') |
|---|
| 36 | wft.updateRoleMappings() |
|---|
| 37 | |
|---|
| 38 | def postInstall(context): |
|---|
| 39 | """Called as at the end of the setup process. """ |
|---|
| 40 | # the right place for your custom code |
|---|
| 41 | if isNotATGoogleMapsProfile(context): return |
|---|
| 42 | site = context.getSite() |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | ##code-section FOOT |
|---|
| 47 | ##/code-section FOOT |
|---|
Note: See
TracBrowser
for help on using the repository browser.