Back to index

plone3  3.1.7
Migrate.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # PlonePAS - Adapt PluggableAuthService for use in Plone
00004 # Copyright (C) 2005 Enfold Systems, Kapil Thangavelu, et al
00005 #
00006 # This software is subject to the provisions of the Zope Public License,
00007 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this
00008 # distribution.
00009 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
00010 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00011 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
00012 # FOR A PARTICULAR PURPOSE.
00013 #
00014 ##############################################################################
00015 """
00016 Minimalist GRUF Migration
00017 """
00018 from StringIO import StringIO
00019 from Install import install
00020 
00021 def migrate(self):
00022     """
00023     """
00024     gruf = self.acl_users
00025     out = StringIO()
00026 
00027     log = install( self )
00028     out.write( log )
00029 
00030     pas = self.acl_users
00031     pas.manage_addProduct['PlonePAS'].manage_addGRUFBridge(
00032         "gruf_bridge"
00033         )
00034 
00035     bridge = pas.gruf_bridge
00036     bridge.manage_delObject(['acl_users'])
00037     bridge._setObject('acl_users', gruf)
00038     self.__allow_groups__ = pas
00039 
00040 
00041     return "GRUF Bridge Installed"