source: ATGoogleMaps/branches/for-plone30/setuphandlers.py @ 194

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
16import logging
17logger = logging.getLogger('ATGoogleMaps: setuphandlers')
18from Products.ATGoogleMaps.config import PROJECTNAME
19from Products.ATGoogleMaps.config import DEPENDENCIES
20import os
21from Products.CMFCore.utils import getToolByName
22import transaction
23##code-section HEAD
24##/code-section HEAD
25
26def isNotATGoogleMapsProfile(context):
27    return context.readDataFile("ATGoogleMaps_marker.txt") is None
28
29
30
31def 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
38def 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.