<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>Script_magic</string> </key>
            <value> <int>3</int> </value>
        </item>
        <item>
            <key> <string>_bind_names</string> </key>
            <value>
              <object>
                <klass>
                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>_asgns</string> </key>
                        <value>
                          <dictionary>
                            <item>
                                <key> <string>name_container</string> </key>
                                <value> <string>container</string> </value>
                            </item>
                            <item>
                                <key> <string>name_context</string> </key>
                                <value> <string>context</string> </value>
                            </item>
                            <item>
                                <key> <string>name_m_self</string> </key>
                                <value> <string>script</string> </value>
                            </item>
                            <item>
                                <key> <string>name_subpath</string> </key>
                                <value> <string>traverse_subpath</string> </value>
                            </item>
                          </dictionary>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>_body</string> </key>
            <value> <string># This script contains some steps which are not yet supported\n
# by configuration items. Each feature should be back ported to\n
# ERP5Configurator as an specific Configuration Item.\n
\n
portal = context.getPortalObject() \n
\n
## Create new portal tool for Vifib\n
if getattr(portal, "portal_certificate_authority", None ) is None:\n
  portal.manage_addProduct[\'ERP5\'].manage_addTool(\'ERP5 Certificate Authority Tool\', None)\n
  print "Created portal_certificate_authority"\n
else:\n
  print "portal_certificate_authority already exists."\n
\n
## Set Authentification Plugin\n
plugin_id = "vifib_auth"\n
user_folder = context.acl_users\n
if plugin_id not in user_folder.objectIds():\n
  # check if it\'s not already created\n
  user_folder.manage_addProduct[\'Vifib\'].addVifibMachineAuthenticationPlugin(\n
                                              id = plugin_id, \n
                                              title = "Vifib Machine Authentication Plugin")\n
  print "%s Plugin added at acl_users." % plugin_id\n
else:\n
  print "%s Plugin already added added at acl_users." % plugin_id\n
\n
vifib_plugin = getattr(user_folder, plugin_id)\n
vifib_plugin.manage_activateInterfaces(interfaces=[\'IAuthenticationPlugin\',\n
                                                   \'IUserEnumerationPlugin\', \n
                                                   \'IGroupsPlugin\', \n
                                                   \'IExtractionPlugin\' ])\n
print "Enabled "\n
## This is a hack, the initial users should be created by traditional \n
## user configurator state.\n
##test_vifib_admin = self.person_module.searchFolder(portal_type="Person", \n
##                                       reference="test_vifib_admin")\n
\n
##if len(user.searchFolder(portal_type="Assignment", validation_date="started")) == 0:\n
##  assignment = test_vifib_admin.newContent(portal_type="Assignment")\n
##  assigment.setGroup("group/vifib")\n
##  assignment.start()\n
  \n
\n
\n
return printed\n
</string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string></string> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>BusinessCondiguration_additionalConfiguration</string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
