Commit 91b98ea1 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ERP5Wizard: Archived to erp5-archive repository (acked by @jp): not used...

ERP5Wizard: Archived to erp5-archive repository (acked by @jp): not used anymore and not going to be migrated to ZODB Components.
parent e94d47ca
......@@ -45,11 +45,10 @@ def iterate(obj, script=True, form=True, field=True, listbox=True, template=True
iterate(context.portal_skins.nexedi_express_configuration, form=False)
iterate(context.portal_skins.erp5_generator, template=True, form=False, field=False)
iterate(context.portal_skins.erp5_generator_widgets, template=True, form=False, field=False)
iterate(context.portal_skins.erp5_wizard, template=True, form=False, field=False)
# Collect from ERP5Configurator and ERP5Wizard products.
# Collect from ERP5Configurator product.
for message, path in context.Base_findMessageListFromPythonInProduct(FUNC_NAME_LIST):
if 'ERP5Wizard' in path or 'ERP5Configurator' in path:
if 'ERP5Configurator' in path:
add_message(message, path)
# Collect workflow transition documents from workflow module.
......@@ -69,7 +68,6 @@ for page_dict in context.ConfigurationTemplate_readOOCalcFile('nexedi_express_co
# ERP5 Form title
#
# Add exceptional form
form_list.append(context.erp5_wizard.WizardTool_view)
form_list.append(context.nexedi_express_configuration.ExpressConfiguration_setupEmployeeListForm)
for i in form_list:
if (i.getId().endswith('_viewFieldLibrary') or
......@@ -81,8 +79,6 @@ for i in form_list:
add_message(i.title, portal_url.getRelativeContentURL(i))
# Add exceptional fields
field_list.append(context.erp5_wizard.WizardTool_view.my_ac_password)
field_list.append(context.erp5_wizard.WizardTool_view.my_user_preferred_language)
for i in field_list:
add_message(safe_get_value(i, 'title'), portal_url.getRelativeContentURL(i))
if i.has_value('default') and not i.get_tales('default'):
......
......@@ -29,11 +29,6 @@
from Products.CMFCore.utils import getToolByName
from Products import PluggableAuthService
try:
from Products.ERP5Wizard.PAS.ERP5RemoteUserManager import ERP5RemoteUserManager
except ImportError:
#Wizard tool can not be present
ERP5RemoteUserManager = None
PluggableAuthServiceTool = PluggableAuthService.PluggableAuthService.PluggableAuthService
IUserEnumerationPlugin = PluggableAuthService.interfaces.plugins.IUserEnumerationPlugin
......@@ -57,23 +52,3 @@ def isLocalLoginAvailable(self, login):
if isinstance(acl_users,PluggableAuthServiceTool):
return not acl_users.searchUsers(login=login, exact_match=True)
return None
def isSingleSignOnEnable(self):
"""
Check that a ERP5 Remote User manager is present as authentication plugin
"""
if ERP5RemoteUserManager is None:
return False
portal = self.getPortalObject()
acl_users = getToolByName(portal, 'acl_users')
if isinstance(acl_users,PluggableAuthServiceTool):
#List plugin which make authentication
plugin_list = acl_users.plugins.listPlugins(IAuthenticationPlugin)
for _, plugin_value in plugin_list:
#Try to find an ERP5RemoteUserManager
if isinstance(plugin_value, ERP5RemoteUserManager):
#SSO is enable
return True
return False
......@@ -51,11 +51,4 @@ if credential_request_count_result[0][0] > 0:
if not context.ERP5Site_isLocalLoginAvailable(value):
return False
if context.ERP5Site_isSingleSignOnEnable():
#check username is unique and valid
if not context.WizardTool_isPersonReferenceGloballyUnique(editor=value,
request=REQUEST,
ignore_users_from_same_instance=0):
return False
return True
......@@ -55,18 +55,7 @@ if not login.hasPassword():
password = context.Person_generatePassword()
login.setPassword(password)
# create a global account
if context.ERP5Site_isSingleSignOnEnable():
#The master manage encoded password and clear password
person.Person_createNewGlobalUserAccount(password=password)
person.Person_validateGlobalUserAccount()
if login.getValidationState() == 'draft':
login.validate()
else:
#Person has an already an account
if context.ERP5Site_isSingleSignOnEnable():
#Check assignment for the current instance
person.Person_validateGlobalUserAccount()
return reference, password
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>isSingleSignOnEnable</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>Credential</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_isSingleSignOnEnable</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_action</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>person_reuse_existing_login</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>10.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Reuse Existing User</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Person_reuseExistingUserDialog</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: not here.Person_getUserId() and context.portal_wizard.WizardTool_isUserSynchronizationAllowed()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>express_preference</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>9.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Express</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/SystemPreference_viewExpress</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/WizardTool_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
##############################################################################
#
# Copyright (c) 2002-2009 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
def ERP5Site_getERP5InstanceState(self, witch_login=None, witch_password=None):
"""
This script get some information from the instance. This usefull for
compare informations and verify the status of the instance.
"""
result = {}
preferences = {}
portal = self.getPortalObject()
portal_preferences = portal.portal_preferences
portal_wizard = portal.portal_wizard
# wizard authentication
if witch_password is not None and witch_login is not None:
result['witch_authentication'] = portal_wizard._isCorrectConfigurationKey(witch_login, witch_password)
else:
result['witch_authentication'] = -1
for accessor_name in ('PreferredExpressUserId',
'PreferredExpressPassword',
'PreferredWitchToolServerUrl',
'PreferredWitchToolServerRoot',
'PreferredExpressSubscriptionStatus',
'PreferredExpressErp5Uid',
'PreferredHtmlStyleAccessTab',):
preferences[accessor_name] = getattr(portal_preferences, 'get%s' % accessor_name)()
result['preference_dict'] = preferences
# bt5 list
result['bt5_list'] = [{'title': x.getTitle(),
'version': x.getVersion(),
'revision': x.getRevision()} for x in
portal.portal_templates.getInstalledBusinessTemplateList()]
return result
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Extension Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>WizardUtils</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>extension.erp5.WizardUtils</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Extension Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1377844532.02</float>
<string>GMT+9</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Preference" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_express_default_customer_preference</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Preference</string> </value>
</item>
<item>
<key> <string>preferred_express_after_setup_script_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>preferred_express_configuration_status</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>preferred_express_erp5_uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>preferred_express_password</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>preferred_express_user_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>preferred_subversion_user_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>preferred_subversion_working_copy</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>preferred_witch_tool_server_root</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>preferred_witch_tool_server_url</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Erp5 Express Default Customer Preference</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Wizard Tool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Wizard Tool</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addFolder</string> </value>
</item>
<item>
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Wizard Tool</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>WizardTool</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<workflow_chain>
<chain>
<type>Assignment</type>
<workflow>express_person_interaction_workflow</workflow>
</chain>
<chain>
<type>Person</type>
<workflow>express_person_interaction_workflow</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_wizard</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
THis script is called from UI for creating a global account. In case of remote server failure
return 0 which will stop user and show an explanation message.
"""
try:
return int(context.WizardTool_isPersonReferenceGloballyUnique(editor, request, ignore_users_from_same_instance))
except:
return 0
<?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>_params</string> </key>
<value> <string>editor, request, ignore_users_from_same_instance=0</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_validatePersonReference</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Check if person\'s reference is unique in Authentification Server in a safe way</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_list_field</string>
<string>my_password</string>
<string>my_string_field</string>
<string>my_label_field</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Wizard Field Library</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_label_field</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_label_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_list_field</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_password</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_password</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>ERP5Site_getERP5InstanceState</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>WizardUtils</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getERP5InstanceState</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
# ERP5 Site is set by erp5_site_global_id
# but fallback to erp5_sql_connection.connection_string for old sites
portal = context.getPortalObject()
erp5_site_global_id = getattr(portal, 'erp5_site_global_id', None)
if erp5_site_global_id is None:
erp5_site_global_id = portal.erp5_sql_connection.connection_string.split("@")[0]
return erp5_site_global_id
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getExpressInstanceUid</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Get this Express instance Uid</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
group = kw.get('group')
function = kw.get('function')
activity = kw.get('activity')
title = kw.get('title')
description = kw.get('description')
start_date = kw.get('start_date')
stop_date = kw.get('stop_date')
if None not in [start_date, stop_date, group, function]:
assignment = context.newContent(portal_type='Assignment', **kw)
assignment.open()
return assignment
<?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>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_createAssignment</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
if person is None:
person = context
kw = context.Person_getDataDict(person=person)
kw['password'] = password
# explicitly check if username is unique
if portal.Base_validatePersonReference(kw['reference'], context.REQUEST):
# create user in Authentification Server
kw['start_assignment'] = len(person.Person_getAvailableAssignmentValueList())
portal.portal_wizard.callRemoteProxyMethod(
'WitchTool_createNewGlobalUserAccountFromExpressInstance', \
use_cache = 0, \
ignore_exceptions = 0, \
**kw)
else:
# user reference is NOT unique (valid) in Nexedi ERP5
raise ValueError, "User reference not unique"
<?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>_params</string> </key>
<value> <string>password=None, person=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_createNewGlobalUserAccount</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
return {'reference': person.getReference(),
'validation_state': person.getValidationState(),
'email': person.getDefaultEmailText(),
'erp5_uid': context.ERP5Site_getExpressInstanceUid()}
<?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>_params</string> </key>
<value> <string>person=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_getDataDict</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Get Person data</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Invalidate global user account.
Only invalidate if the local user has no Valid Assigments and
reference.
"""
if person is None:
person = context
reference = person.getReference()
assignment_len = len(person.Person_getAvailableAssignmentValueList())
if reference is not None and assignment_len == 0:
# invalidate user in Authentification Server only if
# its a loggable user in current instance
kw = context.Person_getDataDict(person=person)
context.portal_wizard.callRemoteProxyMethod(
'WitchTool_invalidateGlobalUserAccountFromExpressInstance', \
use_cache = 0, \
ignore_exceptions = 0, \
**kw)
else:
from Products.ERP5Type.Log import log
log("Unable to invalidate remote global account for "\
"%s (reference=%s , len(assignment_list)=%s)" % (person.getRelativeUrl(),
reference, assignment_len))
<?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>_params</string> </key>
<value> <string>person=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_invalidateGlobalUserAccount</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Invalidate global Person object from Instance to Authentification Server</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Allow to reuse an existing user from another instance.
"""
translateString = context.Base_translateString
portal = context.getPortalObject()
request = context.REQUEST
kw = {}
kw['start_date'] = request.get('start_date', None)
kw['stop_date'] = request.get('stop_date', None)
kw['group'] = request.get('field_my_group', None)
kw['function'] = request.get('field_my_function', None)
kw['activity'] = request.get('field_my_activity', None)
kw['title'] = request.get('field_my_title', None)
kw['description'] = request.get('field_my_description', None)
# XXX(lucas): Remove DateTime, because XML-RPC can not handle it.
request.form['start_date'] = ""
request.REQUEST.form['stop_date'] = ""
if context.getReference():
portal_status_message = translateString('User has login already.')
elif not context.WizardTool_isPersonReferencePresent(reference):
portal_status_message = translateString('User does not exist yet.')
else:
# create a local copy
context.edit(reference=reference)
# create local assignment
tag = '%s_reuse_create_assignment' % context.getId()
context.activate(tag=tag).Person_createAssignment(**kw)
# create a global account
if 1:#portal.portal_wizard.isSingleSignOnEnabled():
context.activate(after_tag=tag).Person_synchroniseExistingAccountWithInstance()
# create a global account
context.Person_synchroniseExistingAccountWithInstance()
portal_status_message = translateString('Status changed.')
# redirect appropriately
context.Base_redirect(form_id=form_id,
keep_items={'portal_status_message': portal_status_message})
<?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>_params</string> </key>
<value> <string>reference, form_id=\'view\'</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_reuseExistingUserAction</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Person_reuseExistingUserAction</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>your_reference</string>
<string>my_title</string>
<string>my_start_date</string>
<string>my_stop_date</string>
<string>my_function</string>
<string>my_group</string>
<string>my_activity</string>
<string>my_description</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_reuseExistingUserDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Person_reuseExistingUserDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Reuse Existing User</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
<string>required</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_activity</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_activity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Assignment_view</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.Person_getAvailableAssignmentValueList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Assignment_view</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.Person_getAvailableAssignmentValueList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
<string>required</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_function</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_function</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Assignment_view</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.Person_getAvailableAssignmentValueList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
<string>required</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_group</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_group</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Assignment_view</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.Person_getAvailableAssignmentValueList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
<string>required</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_start_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_start_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Assignment_view</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.Person_getAvailableAssignmentValueList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
<string>required</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_stop_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_stop_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Assignment_view</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.Person_getAvailableAssignmentValueList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Assignment_view</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.Person_getAvailableAssignmentValueList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_reference</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Existing User Login</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
if person is None:
person = context
kw = context.Person_getDataDict(person=person)
# explicitly check if username is unique
if portal.WizardTool_isPersonReferencePresent(kw['reference']):
# create assignment for user in Authentification Server
portal.portal_wizard.callRemoteProxyMethod(
'WitchTool_createNewAssignmentForExistingPerson',
use_cache = 0,
ignore_exceptions = 0,
**kw)
else:
raise ValueError, "User does not exist yet"
<?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>_params</string> </key>
<value> <string>person=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_synchroniseExistingAccountWithInstance</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Validate persons on remote master server.
Only validate remote person/assigments if person
has reference and valid assigments.
"""
from Products.ERP5Type.Log import log
if person is None:
person = context
reference = person.getReference()
assignment_len = len(person.Person_getAvailableAssignmentValueList())
if reference is not None and assignment_len > 0:
# validate user in Nexedi ERP5 only if its a loggable user in current instance
kw = context.Person_getDataDict(person=person)
context.portal_wizard.callRemoteProxyMethod(
'WitchTool_validateGlobalUserAccountFromExpressInstance', \
use_cache = 0, \
ignore_exceptions = 0, \
**kw)
else:
log("Unable to validate remote global account for "\
"%s (reference=%s , len(assignment_list)=%s)" % (person.getRelativeUrl(),
reference, assignment_len))
<?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>_params</string> </key>
<value> <string>person=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_validateGlobalUserAccount</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validate global Person object from Instance to Authentification Server</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_preferred_express_user_id</string>
<string>my_preferred_express_password</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>my_preferred_witch_tool_server_url</string>
<string>my_preferred_witch_tool_server_root</string>
<string>my_preferred_express_subscription_status</string>
<string>my_preferred_express_configuration_status</string>
<string>my_preferred_express_client_uid</string>
<string>my_preferred_express_erp5_uid</string>
<string>my_preferred_express_after_setup_script_id</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SystemPreference_viewExpress</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Preference_viewExpress</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Express Preferences</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_express_after_setup_script_id</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Express after Setup Script ID</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_express_client_uid</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Express Unique Client ID</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>items</string>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_express_configuration_status</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Express Configuration Status</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.portal_membership.checkPermission(\'Manage Portal\', here)</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:[(\'\', \'\'), (\'Configured\', \'1\')]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_express_erp5_uid</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Express Unique ERP5 ID</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_express_password</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_password</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Subscription Password</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>items</string>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_express_subscription_status</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Express Subscription Status</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.portal_membership.checkPermission(\'Manage Portal\', here)</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:[(\'\', \'\'), (\'Subscribed\', \'1\')]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_express_user_id</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Subscription User ID</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_witch_tool_server_root</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Server Root</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.portal_membership.checkPermission(\'Manage Portal\', here)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_witch_tool_server_url</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Server URL</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.portal_membership.checkPermission(\'Manage Portal\', here)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
# call remote instance to make the real check for us at server side
if login is not None and password is not None:
try:
return context.portal_wizard.callRemoteProxyMethod(
'Base_authenticateCredentialsFromExpressInstance', \
use_cache = 0, \
ignore_exceptions = 0, \
**{'login': login,
'password': password,
'erp5_uid': context.ERP5Site_getExpressInstanceUid()})
except:
# if an exception occurs at server side do NOT let user in.
return 0
return 0
<?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>_params</string> </key>
<value> <string>login, password, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_authenticateCredentials</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Authenticate against Authentification Server</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Use this function in local TioLive instance form to change global password for an user.
"""
portal = context.getPortalObject()
kw = {'reference': reference,
'new_password': new_password,
'old_password': old_password,
'erp5_uid': portal.ERP5Site_getExpressInstanceUid()}
return portal.portal_wizard.callRemoteProxyMethod( \
distant_method = 'WitchTool_changeGlobalUserPasswordFromExpressInstance', \
use_cache = 0, \
ignore_exceptions = 0, \
**kw)
<?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>_params</string> </key>
<value> <string>reference, old_password, new_password</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_changeGlobalUserPasswordFromExpressInstance</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>validateSettings</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string>multipart/form-data</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_dialogForm</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>wizard_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Submit</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
# XXX: take this list from remote server using portal_wizard calls
return (('English', 'en'),
('Français', 'fr'))
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_getConfigurationLanguageList</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Get available configuration languages</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
REQUEST = context.REQUEST
# First, find a cookie already made before.
COOKIE_NAME = 'configurator_user_preferred_language'
user_preferred_language = REQUEST.cookies.get(COOKIE_NAME, None)
if user_preferred_language is not None:
# user already have explicitly selected language
return user_preferred_language
# use language from browser's settings
configuration_language_list = []
for item in context.WizardTool_getConfigurationLanguageList():
configuration_language_list.append(item[1])
http_accept_language = REQUEST.get('HTTP_ACCEPT_LANGUAGE', 'en')
for language_set in http_accept_language.split(','):
language_tag = language_set.split(';')[0]
language = language_tag.split('-')[0]
if language in configuration_language_list:
return language
return 'en'
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_getUserPreferredLanguage</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Get user preferred language from browser</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
reference = str(editor)
return int(context.portal_wizard.callRemoteProxyMethod(
'Base_isPersonReferenceUnique', \
use_cache = 0, \
ignore_exceptions = 0, \
**{'reference':reference,
'ignore_users_from_same_instance':ignore_users_from_same_instance,
'erp5_uid': context.ERP5Site_getExpressInstanceUid()}))
<?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>_params</string> </key>
<value> <string>editor, request, ignore_users_from_same_instance=0</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_isPersonReferenceGloballyUnique</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Check if person\'s reference is unique in Authentification Server</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
reference = str(editor)
portal = context.getPortalObject()
return int(portal.portal_wizard.callRemoteProxyMethod(
'Base_isPersonReferencePresent', \
use_cache = 0, \
ignore_exceptions = 0, \
**{'reference':reference,
'erp5_uid': context.ERP5Site_getExpressInstanceUid()}))
<?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>_params</string> </key>
<value> <string>editor, request=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_isPersonReferencePresent</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Check if person\'s reference is present Authentification Server</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
# for the moment only having set in preferences server url is enough
return context.portal_wizard.getServerUrl() not in ('', None)
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_isUserSynchronizationAllowed</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Check if user synchronization is allowed or possible at all</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>login</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_header</string>
<string>my_user_preferred_language</string>
<string>my_ac_password</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>wizard_form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Start</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_ac_password</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_password</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Configuration Key</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_wizard.callRemoteProxyMethod(\'WizardTool_viewConfigurationKeyLabelMessageRenderer\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>css_class</string>
<string>title</string>
<string>default</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_header</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string>hidden_label</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_label_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string encoding="cdata"><![CDATA[
&nbsp;
]]></string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_wizard.callRemoteProxyMethod(\'WizardTool_viewWelcomeMessageRenderer\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>required</string>
<string>title</string>
<string>default</string>
<string>items</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_user_preferred_language</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWizardFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Language</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/WizardTool_getUserPreferredLanguage</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/WizardTool_getConfigurationLanguageList</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_wizard.callRemoteProxyMethod(\'WizardTool_viewConfigurationLanguageLabelMessageRenderer\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_viewNextPossibleActionListRenderer</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block
tal:define="isAllowedExpress python: here.portal_wizard.getExpressConfigurationPreference('preferred_express_user_id', None) is not None and
here.portal_wizard.getExpressConfigurationPreference('preferred_express_password', None) is not None">
<h5 id="wizard_message"
style="visibility:hidden;"
tal:content="python:test(isAllowedExpress, 'true', 'false')"></h5>
<script type="text/javascript" src="wizard_helper.js"></script>
<noscript>
Please enable JavaScript in your web browser, otherwise the configuration server
does not work properly.
</noscript>
</tal:block>
\ No newline at end of file
# different part of the configuration process in estimatd percentages
# values for machine with pystones =(1.3600000000000012, 36764.705882352908)
building_bt5_part_percentage = 15.0
installation_bt5_part_percentage = 26.0
activity_part_percentage = 59.0
calc_percentage = 0.0
is_activities_running = len(installation_status['activity_list'])!=0
is_bt5_building_running = installation_status['bt5']['all']==0 and \
not is_activities_running
is_bt5_installation_running = installation_status['bt5']['all']!=0 and \
not is_activities_running
if not is_bt5_building_running:
all_bt5s = float(installation_status['bt5']['all'])
current_bt5s = float(installation_status['bt5']['current'])
bt5_percent_of_total = current_bt5s / all_bt5s
calc_percentage = calc_percentage + building_bt5_part_percentage + \
bt5_percent_of_total*installation_bt5_part_percentage
if is_activities_running:
activity_list = installation_status['activity_list']
all_activities = float(max(activity_list))
current_activities = float(activity_list[-1])
activity_percent_of_total = (all_activities - current_activities)/all_activities
calc_percentage += activity_percent_of_total*activity_part_percentage
#context.log('%s\nLast:%s\nAll:%s\-->%s' %(activity_list, current_activities, all_activities, activity_percent_of_total))
return context.WizardTool_viewRunningInstallationMessageRenderer(percentage=int(calc_percentage))
<?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>_params</string> </key>
<value> <string>installation_status</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_viewRunningInstallationMessage</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Calculate percentages and show installation message</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_viewRunningInstallationMessageRenderer</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Successful Installation Confirmation</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:define="percentage options/percentage;
coefficient python: 4;">
<div style="width:400px;
height:25px;
background-color:lightgray;
border:1px solid black;">
<div tal:attributes="style python: 'text-align:right;;
height: 25px;;
background-color:#f09400;;
width: %spx;;' %(coefficient*percentage)">
<div style="height:20px;
padding-top: 5px;
padding-right: 3px;
font-weight:bold;"
tal:condition="python: int(percentage) != 0">
<span tal:content="percentage"/>%
</div>
</div>
</div>
<tal:block
tal:replace="structure python: here.portal_wizard.callRemoteProxyMethod('WizardTool_viewPatienceMessageRenderer')"/>
</tal:block>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WizardTool_viewSuccessfulConfigurationMessageRenderer</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<div>
<tal:block tal:replace="structure python:
here.portal_wizard.callRemoteProxyMethod('WizardTool_viewSuccessfulConfigurationMessageRenderer')"/>
<a tal:attributes="href python: '%s/login_form' %here.getPortalObject().absolute_url()">
<tal:block tal:replace="structure python:
here.portal_wizard.callRemoteProxyMethod('WizardTool_viewSuccessfulConfigurationStartButtonMessageRenderer')"/>
</a>
</div>
REQUEST = context.REQUEST
active_process_id = REQUEST.get('active_process_id', None)
erp5_site_id = context.getPortalObject().getId()
js_string = """
// Initialisation
window.onload = init;
function getNewXMLHTTP() {
try {
return new XMLHttpRequest();
} catch(e) {
try {
var aObj = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
var aObj = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
return false;
}
}
}
return aObj;
}
function checkClientInstallation() {
time_out = window.setTimeout( "checkClientInstallation()", 5000 );
var xhr_object = null;
xhr_object = getNewXMLHTTP();
xhr_object.onreadystatechange = function()
{
var status = document.getElementById('client_installation_status');
if(xhr_object.readyState == 4)
{
if(xhr_object.status == 200)
{
status.innerHTML = xhr_object.responseText;
}
else
status.innerHTML = "Error code " + xhr_object.status;
};
}
xhr_object.open( "GET",
"portal_wizard/getInstallationStatusReportFromClient?active_process_id=%s",
true);
//xhr_object.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr_object.setRequestHeader("Content-Type", "text/html");
xhr_object.setRequestHeader("Cache-Control", "no-cache" )
xhr_object.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT" )
xhr_object.send(null);
}
function init() {
checkClientInstallation();
}
""" %(active_process_id)
return js_string
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Wizard_generateJavaScript</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Generate JavaScript code which will query wizard to get installation status</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Wizard_viewInstallationStatus</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Installation Status Report Renderer</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:replace="nothing"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
</tal:block>
<tal:block metal:define-macro="master">
<tal:block
tal:define="object_uid here/getUid | nothing;
object_path here/getPath | nothing;
form nocall: form | nothing;
form_id form/id | nothing;
form_action python: form and form.action not in ('', None) and here.portal_membership.checkPermission('Modify portal content', here) and form.action or nothing;
local_parameter_list local_parameter_list | python: {};
dummy python: local_parameter_list.update({'object_uid': object_uid, 'object_path': object_path, 'form_id': form_id});
title string:${template/title_or_id} - ${here/Title};
">
<tal:block metal:use-macro="here/wizard_main_template/macros/master">
<tal:block metal:fill-slot="main">
<script type="text/javascript"
language="javascript"
tal:content="here/Wizard_generateJavaScript"/>
<div class="dialog_box">
<div id="server_installation_status"
tal:content="structure here/portal_wizard/getInstallationStatusReportFromServer">
</div>
<div id="client_installation_status"
style="background-color: #FFFFFF;
padding: 0.5em;
border-top: 1px solid #000000;
width: 480px;">
Loading ...
</div>
</div>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>wizard_dialog</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Configuration Forms renderer</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<?xml-stylesheet href="erp5.css" rel="stylesheet" type="text/css"?>
<span tal:replace="nothing">
<!--
Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
Romain Courteaud <tf@nexedi.com>\n
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software\n
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-->
</span>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
metal:use-macro="here/wizard_main_template/macros/master">
<head tal:define="dummy python:request.RESPONSE.setHeader('Content-Type', 'text/html;; charset=utf-8')">
<meta name="description" content="Generated by form_dialog" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title tal:content="template/title_or_id" i18n:translate="" i18n:domain="ui">The title</title>
<link href="erp5.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div metal:fill-slot="main">
<div class="content editable">
<div class="dialog_box">
<tal:block tal:replace="structure python: options.get('form_html')" /> <br/>
<tal:block tal:condition="python: options.get('previous') is not None">
<input type="Submit"
value="Previous"
name="previous:method"
tal:attributes="value python: options.get('previous')"/>
</tal:block>
<tal:block tal:condition="python: options.get('next') is not None">
<span tal:condition="python: form.action!=''">
<input type="Submit"
value="Next"
name="next:method"
tal:attributes="value python: options.get('next')" />
</span>
</tal:block>
</div>
</div>
</div>
</body>
</html>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>wizard_dialog_main</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block metal:define-macro="master">
<tal:block tal:define="form_action python: form.update_action or 'Base_callDialogMethod';
dialog_id form/id | template/id;
form_id request/form_id | string:view;
dialog_method form/action | dialog_id;
update_action form/update_action;
global dialog_category request/dialog_category | nothing;
local_parameter_list local_parameter_list | python: {};
dummy python: local_parameter_list.update({'dialog_id': dialog_id, 'dialog_method': dialog_method, 'update_method': update_action, 'dialog_category': dialog_category, 'cancel_url': request.get('cancel_url'), 'form_id': form_id});
title python: here.Base_translateString(here.Base_getFormViewDialogActionButtonTitle(form))">
<tal:block metal:use-macro="here/wizard_main_template/macros/master">
<tal:block metal:fill-slot="main">
<div class="list_dialog">
<tal:block metal:define-slot="main" />
<tal:block metal:define-slot="bottom" />
</div>
<!--
<input tal:condition="cancel_url|request/cancel_url|nothing"
i18n:attributes="value" i18n:domain="ui" value="Cancel Action"
id="dialog_cancel_button" name="Base_cancel:method" type="submit" />
<input i18n:attributes="value" i18n:domain="ui" value="Update"
tal:condition="python: form.update_action!=''"
id="dialog_update_button"
name="Base_showUpdateDialog:method" type="submit" />
<input tal:attributes="value python: here.Base_getFormViewDialogActionButtonTitle(form);"
i18n:attributes="value" i18n:domain="ui" accesskey="V"
id="dialog_submit_button" type="submit" name="Base_callDialogMethod:method" />
-->
<tal:block tal:replace="structure python:
here.portal_wizard.callRemoteProxyMethod('WizardTool_viewStartButtonLabelMessageRenderer')"/>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>wizard_form_dialog</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Wizard forms renderer</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block metal:define-macro="master"
tal:define="editable_mode python: True;
dialog_mode python: True;
dummy python: request.set('editable_mode', editable_mode)">
<tal:block metal:use-macro="here/wizard_dialog_main/macros/master">
<tal:block metal:fill-slot="main">
<tal:block tal:define="field_errors python: request.get('field_errors',{});
dummy python: request.set('here', here);
dialog_actions python: here.Base_fixDialogActions(actions, dialog_category);
current_action python: here.ERP5Site_getCurrentDialogAction(current_url, dialog_actions);
field_render here/field_render/macros/field_render;">
<tal:block tal:condition="preferred_html_style_developper_mode">
<tal:block metal:use-macro="developper_shortcut_render/macros/form" />
</tal:block>
<div class="dialog_box">
<div tal:condition="python: len(dialog_actions) > 1"
class="dialog_selector">
<label for="dialog_selector"
tal:content="python: { 'object_exchange': 'Select Exchange'
, 'object_print' : 'Select Print'
, 'object_search' : 'Select Search'
, 'object_report' : 'Select Report'
, 'object_fast_input' : 'Select Fast Input'
}.get(dialog_category, 'Select')"
i18n:translate="" i18n:domain="ui"></label>
<select name="select_dialog" id="dialog_selector"
tal:attributes="onchange string:submitAction(this.form,'Base_doDialog')">
<tal:block tal:repeat="action dialog_actions">
<option tal:attributes="value action/url;
selected python: action == current_action and 'selected' or None"
tal:content="action/name"
i18n:translate="" i18n:domain="ui"></option>
</tal:block>
</select>
<button type="submit" name="Base_doDialog:method">
<span class="image"></span>
<span class="description"
i18n:translate="" i18n:domain="ui">Go</span>
</button>
</div>
<tal:block metal:define-macro="content">
<div class="content"
tal:define="group_list python: form.Form_getGroupTitleAndId();
gid_list python: ' '.join([x['gid'] for x in group_list if x not in ('bottom', 'hidden')]);">
<tal:block tal:repeat="group group_list">
<tal:block tal:define="gid group/gid">
<fieldset tal:condition="python: 'hidden' not in gid and 'bottom' not in gid"
tal:attributes="class gid;">
<legend tal:content="group/gtitle" class="group_title" />
<tal:block tal:repeat="field python: form.get_fields_in_group(group['goid'])">
<tal:block metal:use-macro="field_render" />
</tal:block>
</fieldset>
</tal:block>
</tal:block>
<p class="clear"></p>
</div>
</tal:block>
</div>
</tal:block>
</tal:block>
<tal:block metal:define-macro="bottom">
<tal:block metal:fill-slot="bottom">
<tal:block tal:define="field_errors python: request.get('field_errors',{});
dummy python: request.set('here', here);
bottom_group python: form.get_fields_in_group('bottom')">
<div tal:condition="python: len(bottom_group) > 0"
class="bottom">
<tal:block tal:repeat="field bottom_group">
<tal:block tal:condition="preferred_html_style_developper_mode">
<tal:block metal:use-macro="developper_shortcut_render/macros/field_developper" />
</tal:block>
<tal:block tal:define="field_description field/Field_getDescription"
tal:condition="preferred_html_style_translator_mode">
<tal:block metal:use-macro="developper_shortcut_render/macros/field_translator" />
</tal:block>
<tal:block tal:define="value python:request.get(field.id, None)"
tal:replace="structure python:field.render(value, request)" />
</tal:block>
</div>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
displayMessage = function () {
wizard_message = document.getElementById('wizard_message');
wizard_message.style.visibility = 'visible';
if (!/MSIE/.test(navigator.userAgent)) {
if (scrapeText(wizard_message) == 'true') {
wizard_message.innerHTML = '<a href="next">Please click here to access ERP5 Express Configuration service.</a>';
} else {
wizard_message.innerHTML = 'You can not access ERP5 Express Configuration service.';
}
} else {
wizard_message.innerHTML = '<a href="http://www.mozilla.com/firefox/">Please click here to download Firefox, because your browser may not work properly. It is free.</a>';
}
}
addLoadEvent(displayMessage);
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>wizard_helper.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/x-javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>wizard_main_template</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block tal:replace="nothing">
<!--
IDEAS:
- Add callbacks to ERP5Form object (selection ?) to gather needed fields -> put them in http_parameter_list.
-->
</tal:block>
<tal:block metal:define-macro="master">
<tal:block
tal:define="ignore_layout request/ignore_layout | nothing;
layout_form_id request/layout_form_id | here/getApplicableLayout | nothing;
layout_form python: layout_form_id and getattr(here, layout_form_id, None) or None;
is_web_mode python: (layout_form is not None) and (not ignore_layout);
editable_mode python: (not is_web_mode) or request.get('editable_mode', False);
editable_mode_backup editable_mode;
dummy python: request.set('editable_mode', editable_mode);
dummy python: request.set('is_web_mode', is_web_mode);
page_template python: is_web_mode and ((layout_form.meta_type=='Page Template' and layout_form.id) or getattr(layout_form, 'pt', None)) or 'wizard_template_erp5_xhtml_style';">
<tal:block metal:use-macro="python: getattr(here, page_template).macros['master']">
<tal:block metal:fill-slot="context_bar">
<tal:block metal:define-slot="context_bar" />
</tal:block>
<tal:block metal:fill-slot="main"
tal:define="editable_mode editable_mode_backup;
dummy python: request.set('editable_mode', editable_mode);">
<tal:block metal:define-slot="main" />
</tal:block>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>wizard_template_erp5_xhtml_style</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block tal:replace="nothing">
<!--
IDEAS:
- Add callbacks to ERP5Form object (selection ?) to gather needed fields -> put them in http_parameter_list.
-->
</tal:block>
<tal:block metal:define-macro="master">
<tal:block tal:define="global_definitions_macros here/global_definitions/macros">
<tal:block metal:use-macro="global_definitions_macros/header_definitions" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<base tal:attributes="href python: '%s/' % (url, )" />
<meta name="generator" content="ERP5 - Copyright (C) 2001 - 2008. All rights reserved." />
<meta name="description" content=""
tal:attributes="content title | string:ERP5 Free Open Source ERP and CRM" />
<meta name="keywords" content=""
tal:attributes="content python:', '.join(here.getProperty('subject_list', []) or [])" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title tal:define="title title | string:ERP5"
tal:content="python: '%s | %s' % (title, here.getPortalObject().title_or_id())"></title>
<tal:block tal:replace="nothing">
<!-- Render each field's css and include css's and javascripts. -->
</tal:block>
<tal:block tal:condition="python: form is not None">
<tal:block tal:repeat="group python: [x for x in form.get_groups(include_empty=0) if x != 'hidden']">
<tal:block tal:repeat="field python: form.get_fields_in_group(group)">
<tal:block tal:define="css python: field.render_css(REQUEST=request)">
<style tal:condition="python: css is not None"
tal:content="css"
tal:attributes="type python:'text/css'">
</style>
</tal:block>
<tal:block tal:define="dummy python: css_list.extend(field.get_css_list(REQUEST=request))" />
<tal:block tal:define="dummy python: js_list.extend(field.get_javascript_list(REQUEST=request))" />
</tal:block>
</tal:block>
</tal:block>
<tal:block tal:repeat="css python: css_list">
<link tal:attributes="href css" type="text/css" rel="stylesheet" />
</tal:block>
<tal:block tal:repeat="js python: js_list">
<script tal:attributes="src js" type="text/javascript"></script>
</tal:block>
<link rel="icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" />
</head>
<body>
<form id="main_form"
tal:attributes="enctype form/Form_getEnctype | enctype | nothing;
action url;
method python:str(path('form/method | string:post')).lower()">
<fieldset id="hidden_fieldset">
<!-- Hidden button as explained in http://ppewww.ph.gla.ac.uk/~flavell/www/formquestion.html -->
<!-- We should probably call the default method instead -->
<input tal:condition="form_action | nothing"
id="hidden_button" type="submit" value="dummy"
tal:attributes="name string:${form_action}:method" />
<tal:block metal:use-macro="global_definitions_macros/http_definitions" />
</fieldset>
<tal:block metal:define-slot="layout">
<tal:block tal:replace="structure python:
here.portal_wizard.callRemoteProxyMethod('WizardTool_viewExpressMainTemplateHeaderRenderer')"/>
<!--
<div id="bars">
<div id="main_bar"
tal:content="structure portal/ERP5Site_renderCachedNavigationBox">
</div>
<div id="context_bar">
<tal:block metal:define-slot="context_bar" />
</div>
</div>
-->
<div id="status">
<!--
<div id="breadcrumb">
<tal:block tal:repeat="item here/breadcrumbs">
<a tal:attributes="href item/url" tal:content="item/title" />
/
</tal:block>
</div>
<div id="logged_in_as">
<tal:block tal:condition="not: portal/portal_membership/isAnonymousUser">
<span class="logged_txt" i18n:translate="" i18n:domain="ui">Logged In as :</span>
<tal:block tal:replace="python:portal.Base_getUserCaption()" />
</tal:block>
</div>
-->
<p class="clear"></p>
<div tal:content="request/portal_status_message | nothing" id="transition_message" />
<div id="information_area" tal:condition="python: request.has_key('field_errors')"
i18n:translate="" i18n:domain="ui">
Input data has errors. Please look at error messages below.
</div>
</div>
<div id="master">
<tal:block metal:define-slot="main" />
</div>
</tal:block>
</form>
</body>
</html>
</tal:block>
</tal:block>
</tal:block>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Wizard Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>portal_wizard</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InteractionWorkflowDefinition" module="Products.ERP5.InteractionWorkflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>creation_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>express_person_interaction_workflow</string> </value>
</item>
<item>
<key> <string>manager_bypass</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Interaction Workflow used for Express Customizations</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interaction" module="Products.ERP5.Interaction"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interactions</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<list>
<string>Assigment_closeGlobalUserAssignment</string>
</list>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>assignment_invalidate_global_user_account</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>cancel</string>
<string>close</string>
<string>update</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Assignment</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Invalidate globally user</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: here.WizardTool_isUserSynchronizationAllowed()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<list>
<string>Assigment_openGlobalUserAssignment</string>
</list>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>assignment_validate_global_user_account</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>open</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Assignment</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Open Global Assignment</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: here.WizardTool_isUserSynchronizationAllowed()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<list>
<string>Person_invalidateGlobalUserAccount</string>
</list>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>person_invalidate_global_user_account </string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>invalidate</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Person</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: here.WizardTool_isUserSynchronizationAllowed()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<list>
<string>Person_validateGlobalUserAccount</string>
</list>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>person_validate_global_user_account</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>validate</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Person</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validate Global Person Account</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: here.WizardTool_isUserSynchronizationAllowed()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Scripts" module="Products.DCWorkflow.Scripts"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>scripts</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
assignment = state_change['object']
person = assignment.getParentValue()
person.Person_invalidateGlobalUserAccount()
<?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>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Assigment_closeGlobalUserAssignment</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
assignment = state_change['object']
person = assignment.getParentValue()
person.Person_validateGlobalUserAccount()
<?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>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Assigment_openGlobalUserAssignment</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
person = state_change['object']
# copy it to Nexedi ERP
person.Person_invalidateGlobalUserAccount()
<?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>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_invalidateGlobalUserAccount</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
person = state_change['object']
# copy it to Nexedi ERP
person.Person_validateGlobalUserAccount()
<?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>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_validateGlobalUserAccount</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Variables" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variables</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Worklists" module="Products.DCWorkflow.Worklists"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>worklists</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
2013-08-28 arnaud.fontaine
* ZODB Components: Migrate Documents, Extensions and Tests.
2010-12-13 nicolas.dumazet
* Migrate Tools to portal type classes
2009-10-16 rafael
* Update for the changes of new portal types of portal types.
2009-04-18 Kazuhiko
* Version 5.4.1
2009-02-23 ivan
* Add introspections tool
2008-11-13 yusei
* Start to develop version 5.4.
2008-10-23 yusei
* Remove erp5_tabber.js.
2008-10-14 yusei
* Start to develop version 5.3.
2008-10-10 yusei
* Removed business_template_skin_layer_priority from erp5_wizard skin folder. Now express_customisation bt will control customisation stuff.
2008-10-9 yusei
* Handle HTTP_ACCEPT_LANGUAGE better.
2008-10-06 ivan
* User server side rendered messages (for i18n)
2008-10-2 yusei
* Use cookie to store user's preferred language and set the language value to REQUEST so that next page after login can use correct language.
2008-10-2 yusei
* Update xml format.
2008-10-2 yusei
* Fixed a bug on language selection. Remove country code from language tag.
2008-10-1 vincentd
* Add a js file for overwrite the js of normal access-tab (to access to the sales of Express products), and put a hight priority for
the skin folder
2008-09-25 ivan
* Wizard uses client's preferred language settings
2008-09-02 ivan
* Wizard uses a dedicated template
2008-06-27 yusei
* Start to develop version 5.2.
2008-06-26 yusei
* Revise version to 5.1.
2008-05-19 yo
* Temporarily, recommend firefox for IE users.
2007-12-06 yo
* Move portal_wizard to Tools.
2007-10-03 Yusei
* Added a exclusive preference object for erp5 express and its view form.
2006-04-14 Romain
* First build.
\ No newline at end of file
Copyright (c) 2006 Nexedi SARL
\ No newline at end of file
erp5_base
erp5_web_service
\ No newline at end of file
This tool will help you configure your ERP5 instance.
\ No newline at end of file
GPL
\ No newline at end of file
ivan
\ No newline at end of file
Person | person_reuse_existing_login
System Preference | express_preference
Wizard Tool | view
\ No newline at end of file
extension.erp5.WizardUtils
\ No newline at end of file
portal_preferences/erp5_express_default_customer_preference
\ No newline at end of file
Wizard Tool
\ No newline at end of file
Assignment | express_person_interaction_workflow
Person | express_person_interaction_workflow
\ No newline at end of file
erp5_wizard
\ No newline at end of file
portal_wizard
\ No newline at end of file
express_person_interaction_workflow
\ No newline at end of file
erp5_wizard
\ No newline at end of file
5.4.7
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>user</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Change Password</string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tiolive_change_password</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>103.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Change Password</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${portal_url}/ERP5Site_redirectToTioLiveChangePasswordDialog</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>member</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>global</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Provides direct access to TioLive Chat page</string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tiolive_chat</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>104.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>TioLive Chat</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ERP5Site_redirectToTioLiveChat</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>member</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>global</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Provides direct access to TioLive Documentation page</string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tiolive_documentation</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>100.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>TioLive Documentation</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ERP5Site_redirectToTioLiveDocumentation</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>global</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Provides direct access to TioLive Instance Information page</string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tiolive_instance</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>101.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>TioLive Instances</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ERP5Site_redirectToTioLiveInstance</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>member</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>global</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Provides direct access to TioLive Mail page</string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tiolive_mail</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>105.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>TioLive Mail</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ERP5Site_redirectToTioLiveMail</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>member</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>global</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Provides direct access to TioLive User Profile page</string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tiolive_profile</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>102.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>TioLive Profile</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ERP5Site_redirectToTioLiveProfile</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>member</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<registered_skin_selection>
<skin_folder_selection>
<skin_folder>tiolive_base</skin_folder>
<skin_selection>View</skin_selection>
</skin_folder_selection>
</registered_skin_selection>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Folder" module="OFS.Folder"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>202.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tiolive_base</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Get the reference list of all validated business configuration related to the logged user.
"""
from Products.ERP5Type.Log import log
portal = context.getPortalObject()
reference = portal.portal_membership.getAuthenticatedMember().getId()
kw = {'reference': reference}
# XXX: This try except is used in case of connection refused
# and to make sure that the user interface will never be broken.
try:
return context.portal_wizard.callRemoteProxyMethod(
'WitchTool_getBusinessConfigurationReferenceList',
use_cache=1,
ignore_exceptions=0,
**kw)
except:
log('Base_getUserRemoteBusinessConfigurationReferenceList: '
'Could not retrieve the Business Configuration reference list.', level=100)
return []
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getUserRemoteBusinessConfigurationReferenceList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
#
# Advertisement and something for beginners should be added by default.
#
knowledge_box = knowledge_pad.newContent(
portal_type='Knowledge Box',
specialise='portal_gadgets/erp5_advertisement',
activate_kw = activate_kw)
knowledge_box.visible()
# Documentation Gadget
knowledge_box = knowledge_pad.newContent(
portal_type='Knowledge Box',
specialise='portal_gadgets/erp5_documentation',
activate_kw=activate_kw)
knowledge_box.visible()
# Put gadgets side by side by default.
# XXX Not so frendly.
knowledge_pad.edit(user_layout="1##2##")
<?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>_params</string> </key>
<value> <string>knowledge_pad, **activate_kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_createDefaultKnowledgeBox</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
# This script returns an iterable of the paths to standard JavaScript objects.
# If you want to customize your own site, please override this script
# in your own skin folder. Note that the returned items must be
# relative URLs instead of absolute URLs, i.e. they must be traversable
# from the portal object. This is required for further processing of JavaScript
# data, e.g. compression.
#
# BBB: For the history, erp5_xhtml_appearance.js is included by default when
# js_list is not pre-defined before the global definitions.
js_list = ('MochiKit/MochiKit.js',
'erp5_knowledge_box.js',
'erp5.js',
'portal_wizard/proxy/web_site_module/express_frame/express_advertisement.js',)
return js_list
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getJavaScriptRelativeUrlList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Get TioLive Site root URL.
"""
root_url = context.REQUEST.get('BASE0', 'https://www.tiolive.com')
language = context.Localizer.get_selected_language()
# This is far from perfect, to add language all the time
# in the url, because default languages of
# websites are usually not included in the url. But this
# script is also used in tiolive instances, and from them
# it is impossible to have the configuration of the web site
if language is not None and include_language:
root_url = "%s/%s" % (root_url, language)
return root_url
<?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>_params</string> </key>
<value> <string>include_language=1</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getTioLiveSiteRootUrl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
cancel_url = portal.absolute_url()
return container.REQUEST.RESPONSE.redirect(
'%s/ERP5Site_viewChangeAuthenticatedMemberPasswordDialog?cancel_url=%s'
%(portal.ERP5Site_getTioLiveSiteRootUrl(), cancel_url))
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_redirectToTioLiveChangePasswordDialog</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
return container.REQUEST.RESPONSE.redirect('%s/chat' % portal.ERP5Site_getTioLiveSiteRootUrl(include_language=0))
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_redirectToTioLiveChat</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
return container.REQUEST.RESPONSE.redirect('%s/documentation'
%portal.ERP5Site_getTioLiveSiteRootUrl())
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_redirectToTioLiveDocumentation</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
return container.REQUEST.RESPONSE.redirect('%s/%s'
% (portal.ERP5Site_getTioLiveSiteRootUrl(), site_id))
<?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>_params</string> </key>
<value> <string>site_id=\'instance\'</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_redirectToTioLiveInstance</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
return container.REQUEST.RESPONSE.redirect('%s/mail' % portal.ERP5Site_getTioLiveSiteRootUrl(include_language=0))
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_redirectToTioLiveMail</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
return container.REQUEST.RESPONSE.redirect('%s/profile'
%portal.ERP5Site_getTioLiveSiteRootUrl())
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_redirectToTioLiveProfile</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_viewAnonymousAdvertisementGadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_viewAnonymousDocumentationGadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>breadcrumb_render</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block tal:replace="nothing"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block metal:define-macro="breadcrumb">
<a tal:attributes="href here/ERP5Site_getTioLiveSiteRootUrl">TioLive</a> /
<tal:block tal:repeat="item here/breadcrumbs">
<a tal:attributes="href item/url" tal:content="item/title" />
/
</tal:block>
</tal:block>
</tal:block>
<dtml-var expr="portal_skins.erp5_xhtml_style['erp5.css'](portal_url=portal_url,
main_border_color = main_border_color,
context_bar_background_color = context_bar_background_color,
navigation_bar_background_color = navigation_bar_background_color,
background_color = background_color,
font_family = font_family,
font_size = font_size,
font_color = font_color,
dialog_background_color = dialog_background_color,
dialog_border_color = dialog_border_color,
link_color = link_color,
link_hover_color = link_hover_color,
button_description_color = button_description_color,
document_border_color = document_border_color,
document_background_color = document_background_color,
listbox_label_background_color = listbox_label_background_color,
listbox_odd_background_color = listbox_odd_background_color,
listbox_even_background_color = listbox_even_background_color,
tooltip_border_color = tooltip_border_color,
tooltip_background_color = tooltip_background_color,
tooltip_color = tooltip_color,
listbox_hover_background_color = listbox_hover_background_color,
listbox_stat_background_color = listbox_stat_background_color,
alternate_font_color = alternate_font_color,
group_border_color = group_border_color,)">
/* customize some styles of erp5_xhtml_style/erp5.css */
body {
background: #81B2DC url(<dtml-var expr="portal_url()">/tiolive_base_image/bg.png) repeat-y;
}
.ListSummary table {
background-color: <dtml-var document_background_color>;
}
#status #logged_in_as {
display: none;
}
/* TioLive selectors */
#main_bar {
padding-bottom: 0px;
padding-top: 0px;
}
#top-bar {
background-color:#4780B0;
border-bottom:1px solid #FFFFFF;
overflow:hidden;
}
#fieldset-tiobar {
float:left;
overflow:hidden;
border-style: none;
font-size:11pt;
}
#fieldset-tiobar select{
margin-right: 5px;
}
#main_bar .second {
display: inline;
}
#tiologin {
font-size:9pt;
color:#FFFFFF;
float:left;
height:100%;
line-height:23px;
margin:0 100px 0 0;
padding:5px 0pt 0pt;
text-align: left;
}
#tiologin img#user-img{
margin-left: 5px;
vertical-align: middle;
padding: 3px;
}
#link-login{
float:left;
}
#link-login:link, #link-login:active, #link-login:visited {
color:#FFFFFF;
float:left;
height:100%;
line-height:23px;
font-size:9pt;
font-weight:normal;
text-transform:lowercase;
}
#fieldset-tiosearch {
float:left;
border:none;
font-size:1pt;
color:#f6a801;
background: url(<dtml-var expr="portal_url()">/tiolive_base_image/input-tiosearch.png) no-repeat transparent;
background-position: 0 5px;
}
#fieldset-tiosearch button.input-submit {
border:none;
background: url(<dtml-var expr="portal_url()">/tiolive_base_image/input-tiosearch.png) no-repeat transparent;
background-position: 100px 0;
cursor: pointer;
}
#fieldset-tiosearch input.input-text, #fieldset-tiosearch input.input-text:hover, #fieldset-tiosearch input.input-text:focus {
background: transparent;
border:none;
}
#fieldset-tiosearch {
margin: 0;
width:163px;
right:5px;
overflow: hidden;
display:block;
height: 23px;
}
#fieldset-tiosearch input.input-text {
border: 0;
margin: 0;
padding: 0;
top: 0;
margin-left: 3px;
width:132px;
color: #777777;
}
#fieldset-tiosearch input.input-text:focus {color:#000000}
#fieldset-tiosearch button.input-submit {
width: 23px;
height: 23px;
}
#top-bar fieldset{
padding: 5px;
}
#transition_message {
color: #c40;
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLDocument" module="OFS.DTMLDocument"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>erp5.css</string> </value>
</item>
<item>
<key> <string>_cache_namespace_keys</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>main_border_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>context_bar_background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>navigation_bar_background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>font_family</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>font_size</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>font_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>dialog_background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>dialog_border_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>link_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>link_hover_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>button_description_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>document_border_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>document_background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_label_background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_odd_background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_even_background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>tooltip_border_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>tooltip_background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>tooltip_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_hover_background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_stat_background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>alternate_font_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>group_border_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>alternate_font_color</string> </key>
<value> <string>#596dab</string> </value>
</item>
<item>
<key> <string>background_color</string> </key>
<value> <string>#ABD0F4</string> </value>
</item>
<item>
<key> <string>button_description_color</string> </key>
<value> <string>#000</string> </value>
</item>
<item>
<key> <string>context_bar_background_color</string> </key>
<value> <string>#98C3EC</string> </value>
</item>
<item>
<key> <string>dialog_background_color</string> </key>
<value> <string>#BDD8F8</string> </value>
</item>
<item>
<key> <string>dialog_border_color</string> </key>
<value> <string>#3D5474</string> </value>
</item>
<item>
<key> <string>document_background_color</string> </key>
<value> <string>#E3EAFA</string> </value>
</item>
<item>
<key> <string>document_border_color</string> </key>
<value> <string>#3D6474</string> </value>
</item>
<item>
<key> <string>font_color</string> </key>
<value> <string>#001730</string> </value>
</item>
<item>
<key> <string>font_family</string> </key>
<value> <string>Arial, Helvetica, sans-serif</string> </value>
</item>
<item>
<key> <string>font_size</string> </key>
<value> <string>12px</string> </value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>group_border_color</string> </key>
<value> <string>#97B0D1</string> </value>
</item>
<item>
<key> <string>link_color</string> </key>
<value> <string>#002e3f</string> </value>
</item>
<item>
<key> <string>link_hover_color</string> </key>
<value> <string>#3D6474</string> </value>
</item>
<item>
<key> <string>listbox_even_background_color</string> </key>
<value> <string>#DAE6F6</string> </value>
</item>
<item>
<key> <string>listbox_hover_background_color</string> </key>
<value> <string>#BDD8F8</string> </value>
</item>
<item>
<key> <string>listbox_label_background_color</string> </key>
<value> <string>#C1DAEB</string> </value>
</item>
<item>
<key> <string>listbox_odd_background_color</string> </key>
<value> <string>#FFF</string> </value>
</item>
<item>
<key> <string>listbox_stat_background_color</string> </key>
<value> <string>#C1DAEB</string> </value>
</item>
<item>
<key> <string>main_border_color</string> </key>
<value> <string>#DDF0FF</string> </value>
</item>
<item>
<key> <string>navigation_bar_background_color</string> </key>
<value> <string>#97B0D1</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>tooltip_background_color</string> </key>
<value> <string>#FFD</string> </value>
</item>
<item>
<key> <string>tooltip_border_color</string> </key>
<value> <string>#000</string> </value>
</item>
<item>
<key> <string>tooltip_color</string> </key>
<value> <string>#000</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<dtml-var expr="portal_skins.erp5_knowledge_pad['erp5_knowledge_box.css']">
.tab_selected {
font-weight: bold;
background-color: <dtml-var background_color>;
border-bottom: 1px solid <dtml-var background_color>;
}
#page_wrapper {
background: <dtml-var background_color>;;
margin:0 0 0.5em 0;
padding:0.2em 0 0 0;
}
div.block table.listbox button.sort_button{
background: inherit;
}
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLDocument" module="OFS.DTMLDocument"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>erp5_knowledge_box.css</string> </value>
</item>
<item>
<key> <string>_cache_namespace_keys</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>background_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>background_color</string> </key>
<value> <string>#E3EAFA</string> </value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_tabber.js</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
var loading_deferred = undefined;
function replaceContent(req) {
if (loading_deferred) {
loading_deferred.cancel();
loading_deferred = undefined;
}
//var container = $('container');
var container = MochiKit.DOM.getElement("container");
container.innerHTML = req.responseText;
addOnClickEventsToTabs(req);
}
function showServerSideError(req) {
if (loading_deferred) {
loading_deferred.cancel();
loading_deferred = undefined;
}
//var container = $('container');
var container = MochiKit.DOM.getElement("container");
container.innerHTML = 'Server side error.';
addOnClickEventsToTabs(req);
}
function showLoadingMessage() {
//var container = $('container');
var container = MochiKit.DOM.getElement("container");
container.innerHTML = '<div><p style="text-align: left; vertical-align: middle; font-size: large;">Loading...</p></div>';
loading_deferred = undefined;
}
function selectTab(e) {
//var tab_box = $('tab_box');
//var item_list = tab_box.getElementsByTagName('li');
var item_list = MochiKit.DOM.getElementsByTagAndClassName("li", null, "tab_box");
for (var i = 0; i < item_list.length; i++) {
var item = item_list[i];
//var node = item.getElementsByTagName('a')[0];
var node = MochiKit.DOM.getFirstElementByTagAndClassName("a", null, item);
if (this == node) {
if (getNodeAttribute(item, 'class') != 'selected') {
MochiKit.DOM.setNodeAttribute(item, 'class', 'selected');
}
node.blur();
} else {
if (getNodeAttribute(item, 'class') != 'non_selected') {
MochiKit.DOM.setNodeAttribute(item, 'class', 'non_selected');
}
}
MochiKit.Signal.disconnectAll(node, 'onclick');
MochiKit.Signal.connect(node, 'onclick', function (e) { e.stop(); });
}
var mapping = {
<tal:block
tal:replace="structure python: ',\n'.join(['%s: \x22%s\x22' %(x['id'], x['renderer']) for x in context.ERP5Site_getTabList(add_all_tabs=1)])"></tal:block>
};
var url = mapping[this.parentNode.id];
var d = MochiKit.Async.doSimpleXMLHttpRequest(url);
d.addCallbacks(replaceContent, showServerSideError);
e.stop();
loading_deferred = MochiKit.Async.callLater(0.3, showLoadingMessage);
// Set a cookie.
document.cookie = 'erp5_site_selected_tab=' + escape(this.parentNode.id);
}
<tal:block tal:define="portal python: context.getPortalObject();
portal_url python: portal.absolute_url();
witch_server_root python: portal.portal_preferences.getPreferredWitchToolServerRoot();
site_url python: '\x22%s/portal_wizard/proxy/%s\x22' %(portal_url,witch_server_root)">
function showProductList() {
site_url = <tal:block tal:replace="site_url"></tal:block>;
var url = site_url+"/web_site_module/express_frame/ERP5Site_getExpressProductListFrame";
var d = doSimpleXMLHttpRequest(url);
d.addBoth(replaceContent)
loading_deferred = callLater(0.3, showLoadingMessage);
}
function showProduct(reference) {
site_url = <tal:block tal:replace="site_url"></tal:block>;
var url = site_url+"/web_site_module/express_frame/ERP5Site_getExpressProductFrame?reference=";
url = url + reference;
var d = doSimpleXMLHttpRequest(url);
d.addBoth(replaceContent)
loading_deferred = callLater(0.3, showLoadingMessage);
}
</tal:block>
function addOnClickEventsToTabs(e) {
//var tab_box = $('tab_box');
//var item_list = tab_box.getElementsByTagName('li');
var item_list = MochiKit.DOM.getElementsByTagAndClassName("li", null, "tab_box");
for (var i = 0; i < item_list.length; i++) {
//connect(item_list[i], 'onclick', function(e){e.stop();})
//var node = item_list[i].getElementsByTagName('a')[0];
var node = MochiKit.DOM.getFirstElementByTagAndClassName("a", null, item_list[i]);
MochiKit.Signal.disconnectAll(node, 'onclick');
MochiKit.Signal.connect(node, 'onclick', selectTab);
}
return true;
}
connect(window, 'onload', addOnClickEventsToTabs);
function showProductOnLoad() {
var tmp = window.location.search.substring(1).split("&");
var GET = [];
for (var i in tmp)
if (tmp[i].indexOf("=")!=-1)
GET[decodeURI(tmp[i].substring(0, tmp[i].indexOf("=")))] = decodeURI(tmp[i].substring(tmp[i].indexOf("=")+1));
else
GET[decodeURI(tmp[i])]='';
if (GET["jumptab"])
{
if (GET["reference"])
{
showProduct(GET["reference"]);
}
else
{
showProductList();
}
}
}
addLoadEvent(showProductOnLoad);
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>login_form</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block tal:define="form_action string:logged_in;
global form_id string:login_form;
js_list python: ['%s/login_form.js' % (here.portal_url(), ), '%s/erp5.js' % (here.portal_url(), )];
root_site_url here/ERP5Site_getTioLiveSiteRootUrl">
<tal:block metal:use-macro="here/main_template/macros/master">
<tal:block metal:fill-slot="main">
<div class="content login">
<tal:block tal:condition="python: request.get('came_from', None) is None">
<h1 i18n:translate="" i18n:domain="ui">Log in</h1>
</tal:block>
<tal:block tal:condition="python: request.get('came_from', None) is not None">
<h1 i18n:translate="" i18n:domain="ui">You do not have enough permissions to access this page.</h1>
<p i18n:translate="" i18n:domain="ui">You can login with another user name or
<span i18n:name="go_back"><a href="javascript:history.back();" i18n:translate="">go back</a></span>.
</p>
</tal:block>
<input tal:condition="exists: request/came_from"
type="hidden" name="came_from"
tal:attributes="value request/came_from" />
<fieldset>
<div class="field">
<label for="name" class="required" i18n:translate="" i18n:domain="ui">Username</label>
<div class="input"><input type="text" name="__ac_name" id="name" tal:attributes="value python: request.get('__ac_name') or ''" /></div>
<p class="clear"></p>
</div>
<div class="field">
<label for="password" i18n:translate="" i18n:domain="ui">Password</label>
<div class="input"><input type="password" name="__ac_password" id="password" autocomplete="off" /></div>
<p class="clear"></p>
</div>
<div class="field">
<label for="cb_remember" i18n:translate="" i18n:domain="ui">Remember my name</label>
<div class="input"><input type="checkbox" name="__ac_persistent" value="1" checked="checked" id="cb_remember" /></div>
<p class="clear"></p>
</div>
<div class="field">
<label>&nbsp;</label>
<div class="input">
<input type="submit" value="Login" class="submit"
tal:attributes="name python: '%s:method' % (form_action, )"
i18n:attributes="value" i18n:domain="ui" />
</div>
<p class="clear"></p>
</div>
<div class="field">
<label>&nbsp;</label>
<div class="input">
<a tal:attributes="href string:${root_site_url}/WebSite_viewPasswordResetDialog"
i18n:translate="" i18n:domain="ui">I forgot my password!</a>
</div>
</div>
</fieldset>
<script type="text/javascript">setFocus()</script>
<p i18n:translate="" i18n:domain="ui">Having trouble logging in? Make sure to enable cookies in your web browser.</p>
<p i18n:translate="" i18n:domain="ui">Do not forget to logout or exit your browser when you are done.</p>
<p i18n:translate="" i18n:domain="ui">Setting the 'Remember my name' option will set a cookie with your username, so that when you login next time, your user name will already be filled in for you.</p>
</div>
</tal:block>
</tal:block>
</tal:block>
</tal:block>
"""
Redirect after logout to TioLive root site.
"""
REQUEST = context.REQUEST
tiolive_site_root_url = context.ERP5Site_getTioLiveSiteRootUrl()
if REQUEST.has_key('portal_skin'):
context.portal_skins.clearSkinCookie()
REQUEST.RESPONSE.expireCookie('__ac', path='/')
return REQUEST.RESPONSE.redirect(tiolive_site_root_url+'/logged_out')
<?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>_Access_contents_information_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_bindings_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_cache_settings_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_permissions_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Manage_WebDAV_Locks_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Manage_properties_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Take_ownership_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Undo_changes_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_View_management_screens_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_Lock_items_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_Unlock_items_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_access_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>logout</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Logout handler</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>navigation_box_render</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block tal:define="actions python: here.getPortalObject().portal_actions.listFilteredActionsFor(here);
context_url here/absolute_url;
isAnonymousUser here/portal_membership/isAnonymousUser">
<div id="top-bar">
<fieldset id="fieldset-tiobar">
<span class="first">
<span id="favourites">
<select name="select_favorite"
onchange="submitAction(this.form,'Base_doFavorite')"
tal:define="ordered_global_actions python:here.getOrderedGlobalActionList(actions['global']);
user_actions actions/user;">
<option selected="selected" value=""
i18n:translate="" i18n:domain="ui">My Favourites</option>
<tal:block tal:repeat="action ordered_global_actions">
<option tal:condition="action/disabled"
disabled="disabled">-- <tal:block tal:content="action/title" i18n:translate="" i18n:domain="ui" /> --</option>
<tal:block tal:condition="not:action/disabled"
tal:define="name python: action.get('name', '');
index python: name.find(' (');">
<option tal:condition="python: index &gt;= 0"
tal:attributes="value action/url"><tal:block tal:content="python: name[:index]" i18n:translate="" i18n:domain="ui"></tal:block><tal:block tal:replace="python: name[index:]" /></option>
<option tal:condition="python: index &lt; 0"
tal:attributes="value action/url"
tal:content="action/name"
i18n:translate="" i18n:domain="ui"></option>
</tal:block>
</tal:block>
<option tal:condition="python: getattr(here, 'Base_getUserRemoteBusinessConfigurationReferenceList', None) is not None and not isAnonymousUser"
disabled="disabled">-- <tal:block i18n:translate="" i18n:domain="ui">Your Instances</tal:block> --</option>
<tal:block tal:condition="python: getattr(here, 'Base_getUserRemoteBusinessConfigurationReferenceList', None) is not None"
tal:repeat="instance_id python: here.Base_getUserRemoteBusinessConfigurationReferenceList()">
<option tal:attributes="value python: '%s/%s' % (here.ERP5Site_getTioLiveSiteRootUrl(include_language=0), instance_id)"><tal:block tal:content="python: 'Go to %s' % instance_id" i18n:translate="" i18n:domain="ui"></tal:block></option>
</tal:block>
<tal:block tal:condition="user_actions">
<option disabled="disabled">-- <tal:block i18n:translate="" i18n:domain="ui">User</tal:block> --</option>
<option tal:repeat="action user_actions"
tal:content="action/name"
tal:attributes="value action/url"
i18n:translate="" i18n:domain="ui"></option>
</tal:block>
</select>
</span>
<span id="modules">
<select name="select_module"
onchange="submitAction(this.form,'Base_doModule')"
tal:define="module_list here/ERP5Site_getModuleItemList;">
<option selected="selected" value="" i18n:translate="" i18n:domain="ui">Modules</option>
<option tal:repeat="module module_list"
tal:attributes="value python: module[1]"
tal:content="python: module[0]"
tal:omit-tag="nothing" />
</select>
</span>
<span id="language">
<select name="select_language"
onchange="submitAction(this.form,'Base_doLanguage')">
<option value=""
i18n:translate="" i18n:domain="ui">My Language</option>
<option tal:repeat="language python: here.Localizer.get_languages_map()"
tal:omit-tag="nothing"
tal:attributes="value language/id;
selected python: language['selected'] and 'selected' or nothing;"
tal:content="python: here.Localizer.erp5_ui.gettext(language['title'], lang=language['id'])" />
</select>
</span>
</span>
</fieldset>
<div class="second">
<span id="tiologin"
tal:condition="isAnonymousUser"><a href="#" id="link-login"
tal:attributes="href string:${context_url}/login_form"
i18n:translate="" i18n:domain="ui">Login</a></span>
<span id="tiologin"
tal:define="user_name python:here.Base_getUserCaption()"
tal:condition="not:here/portal_membership/isAnonymousUser"><a href="#" id="link-login"
tal:attributes="href string:${context_url}/logout"
i18n:translate="" i18n:domain="ui">Logout</a>
<img tal:attributes="src string:${context_url}/tiolive_base_image/icon-login.png" id='user-img' alt='user' />
<tal:block tal:replace="user_name">jp</tal:block></span>
<fieldset id="fieldset-tiosearch"
tal:define="search_default_text python:here.Base_translateString('Search')">
<input type="hidden" name="all_languages" value="1" />
<input accesskey="4" type="text" size="40" name="field_your_search_text" class="input-text"
value="Search" tal:attributes="value string:${search_default_text};
onfocus string:if (this.value=='${search_default_text}') this.value='';"
onfocus="this.value='';"
onkeypress="submitFormOnEnter(event, this.form, 'ERP5Site_viewQuickSearchResultList');" />
<button type="submit" class="input-submit" value=""
name="ERP5Site_viewQuickSearchResultList:method"/>
</fieldset>
</div>
</div>
</tal:block>
</tal:block>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Folder" module="OFS.Folder"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tiolive_base_image</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>bg.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>1024</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>icon-login.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>17</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>13</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>input-tiosearch.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>23</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>170</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2010-06-30 Lucas
* Added tiolive_chat and tiolive_mail into portal actions.
2009-04-18 Kazuhiko
* Version 5.4.1
2009-04-06 ivan
* Revert Rafael's changes (r26190)
2009-03-27 rafael
* Added new actions to provide download of logs and Data.fs for Manager Users Only.
2009-02-28 ivan
* Add tiolive top menu skinning
\ No newline at end of file
erp5_base
\ No newline at end of file
This business template provides various patches to standard ERP5 in order to adapt the CSS appearance of forms and menus in the context of TioLive.
\ No newline at end of file
GPL
\ No newline at end of file
jps
\ No newline at end of file
portal_actions | tiolive_change_password
portal_actions | tiolive_chat
portal_actions | tiolive_documentation
portal_actions | tiolive_instance
portal_actions | tiolive_mail
portal_actions | tiolive_profile
\ No newline at end of file
tiolive_base | View
\ No newline at end of file
tiolive_base
\ No newline at end of file
tiolive_base
\ No newline at end of file
5.4.7
\ No newline at end of file
from zLOG import LOG, WARNING
def Alarm_updatePersonModulePasswordInformation(self, **kw):
"""
Decoupling a TioLive Instance, we need to make sure that all the
users must have the password updated from TioLive Master.
"""
portal = self.getPortalObject()
person_list = portal.person_module.searchFolder(portal_type="Person",
reference="!= Null")
person_dict = {}
for person in person_list:
person_dict[person.getReference()] = person.getObject()
kw = dict(reference_list=person_dict.keys())
result = eval(portal.portal_wizard.callRemoteProxyMethod(
'WitchTool_getUserPasswordInformationDict',
use_cache=0,
ignore_exceptions=0,
**kw))
if result is None:
return False
for reference, password in result.iteritems():
person_dict[reference].password = password
return result.keys()
def Alarm_hideChangePasswordAction(self):
"""
The TioLive Instance has an action to change the user password
and it redirects to TioLive Master.
Once the instance is going to be decoupled, such action must be hidden,
because the password management must be done locally instead of
Tiolive Master.
"""
for action in self.portal_actions.listActions():
if action.id == 'tiolive_change_password':
action.visible = 0
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Extension Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TioLiveDecoupleInstance</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>extension.erp5.TioLiveDecoupleInstance</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Extension Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1377844692.28</float>
<string>GMT+9</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Alarm" module="Products.ERP5.Document.Alarm"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_senseDecoupleInstance</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>This alarm is used to decouple the user authentication of such TioLive Instance from TioLive Master.</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tiolive_decouple_user_authentication</string> </value>
</item>
<item>
<key> <string>periodicity_hour</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>10</int> </value>
</item>
<item>
<key> <string>periodicity_month</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_month_day</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1293843660.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>sense_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>solve_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>TioLive Decouple User Authentication</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<workflow_chain>
<chain>
<type>Assignment</type>
<workflow>-express_person_interaction_workflow</workflow>
</chain>
<chain>
<type>Person</type>
<workflow>-express_person_interaction_workflow</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tiolive_decouple_instance</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Call the scripts to decouple the TioLive Instance.
"""
from Products.ERP5Type.Log import log
log("Starting to decouple the TioLive Instance!")
# Update person module.
result = context.Alarm_updatePersonModulePasswordInformation()
if not result:
log("TioLive Instance hasn't been decoupled with success! It could not update the objects from Person Module.")
return False
# Disable the remove user creation.
if not context.Alarm_moveObsoleteSkinObjectList():
log("TioLive Instance hasn't been decoupled with success! It could not move the obsolete objects.")
return False
# Remove Authentication Plugin
context.Alarm_removeAuthenticationPlugin()
context.setEnabled(False)
# Hide change password action
context.Alarm_hideChangePasswordAction()
# Notify customer
context.Alarm_notifyDecoupleInstance(person_list=result)
log("Finished to decouple the TioLive Instance!")
return True
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_decoupleInstance</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>Alarm_hideChangePasswordAction</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>TioLiveDecoupleInstance</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_hideChangePasswordAction</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Decoupling the instance we need to move the Form used to create person
and also the script used.
Those objects are customized into portal_skins/express_customization
and must be moved to tiolive_decouple_obsolete.
The folder tiolive_decouple_obsolete is created only when it is required
and it is not present into portal skins selection.
"""
from Products.ERP5Type.Log import log
portal = context.getPortalObject()
obsolete_object_list = ['Person_createUser',
'Person_viewCreateUserActionDialog']
express_customisation_folder = getattr(portal.portal_skins, "express_customisation", None)
if express_customisation_folder is None:
express_customisation_folder = getattr(portal.portal_skins, "express_customisation_user_synchronization", None)
if express_customisation_folder is None:
return True
obsolete_skin_folder_id = "tiolive_decouple_obsolete"
obsolete_skin_folder = getattr(portal.portal_skins, obsolete_skin_folder_id, None)
if obsolete_skin_folder is None:
portal.portal_skins.manage_addFolder(id=obsolete_skin_folder_id)
try:
object_list = express_customisation_folder.manage_cutObjects(obsolete_object_list)
portal.portal_skins[obsolete_skin_folder_id].manage_pasteObjects(object_list)
except AttributeError:
log('FAILED to move %s to %s skin folder. Please check is the objects are already into %s.' % \
(obsolete_object_list, obsolete_skin_folder_id, obsolete_skin_folder_id))
return False
return True
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_moveObsoleteSkinObjectList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
The customer must be notified about the decouple.
"""
mto = "tiolive-backup@tiolive.com"
mfrom = context.getPortalObject().email_from_address
subject = 'Your TioLive Instance has been decoupled from TioLive Master.'
message = ["""
Your TioLive Instance have been decoupled from TioLive Master.
It means that all the user information has been moved to your instance and from now the user authentication will be done locally.
The user authentication will be much faster now.
TioLive Instance Id: %s
List of users which have been moved to your instance:\n""" % context.ERP5Site_getExpressInstanceUid()]
for person in person_list:
message.append(" %s\n" % person)
context.MailHost.send(''.join(message), mto, mfrom, subject)
<?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>_params</string> </key>
<value> <string>person_list</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_notifyDecoupleInstance</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Script removes the nexedi_authentication plugin.
"""
plugin_id = "nexedi_authentication"
user_folder = context.getPortalObject().acl_users
user_folder.manage_delObjects('nexedi_authentication')
erp5_login_users_plugin = getattr(user_folder, "erp5_login_users")
erp5_login_users_plugin.manage_activateInterfaces(interfaces=['IAuthenticationPlugin', 'IUserEnumerationPlugin'])
return True
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_removeAuthenticationPlugin</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Script check if nexedi_authentication exists.
"""
plugin_id = "nexedi_authentication"
user_folder = context.getPortalObject().acl_users
acl_users_id_list = user_folder.objectIds()
if plugin_id in acl_users_id_list:
return context.Alarm_decoupleInstance()
return False
<?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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_senseDecoupleInstance</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>Alarm_updatePersonModulePasswordInformation</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>TioLiveDecoupleInstance</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_updatePersonModulePasswordInformation</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2013-09-03 arnaud.fontaine
* ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
2013-08-28 arnaud.fontaine
* ZODB Components: Migrate Documents, Extensions and Tests.
2011-03-22 lucas
- We must hide the change password action, once the password management is done locally.
2011-01-18 lucas
- Initial version
\ No newline at end of file
2011 Nexedi SA
\ No newline at end of file
It must be installed only if you want to decouple such instance from TioLive Master.
Login will work locally.
\ No newline at end of file
extension.erp5.TioLiveDecoupleInstance
\ No newline at end of file
portal_alarms/tiolive_decouple_user_authentication
\ No newline at end of file
Assignment | -express_person_interaction_workflow
Person | -express_person_interaction_workflow
\ No newline at end of file
tiolive_decouple_instance
\ No newline at end of file
tiolive_decouple_instance
\ No newline at end of file
......@@ -109,7 +109,6 @@ class TestSpellChecking(ERP5TypeTestCase):
'erp5_publication',
'erp5_simulation_performance_test',
'erp5_ui_test',
'erp5_wizard',
)
def validate_spell(self, sentence):
......
......@@ -66,8 +66,8 @@ class TestNamingConvention(ERP5TypeTestCase):
'erp5_promise', 'erp5_software_pdm', 'erp5_sso_openam', 'erp5_jquery_plugin_hotkey',
'erp5_jquery_plugin_jgraduate', 'erp5_jquery_plugin_svgicon', 'erp5_jquery_plugin_jquerybbq',
'erp5_jquery_plugin_spinbtn', 'erp5_jquery_plugin_svg_editor', 'erp5_svg_editor', 'erp5_syncml',
'erp5_system_event', 'erp5_tiosafe_core', 'erp5_workflow', 'erp5_wizard', 'tiolive_base',
'tiolive_decouple_instance', 'erp5_public_accounting_budget', 'erp5_publication',
'erp5_system_event', 'erp5_tiosafe_core', 'erp5_workflow',
'erp5_public_accounting_budget', 'erp5_publication',
'erp5_social_contracts', 'test_core', 'test_accounting', 'test_web', 'test_html_style',
'test_xhtml_style', 'cloudooo_data', 'cloudooo_web', 'erp5_configurator',
'erp5_configurator_maxma_demo', 'erp5_configurator_run_my_doc', 'erp5_configurator_standard',
......@@ -102,7 +102,7 @@ class TestNamingConvention(ERP5TypeTestCase):
'erp5_calendar', 'erp5_knowledge_pad', 'erp5_km_theme',
'erp5_odt_style', 'erp5_run_my_doc', 'erp5_development',
'erp5_tax_resource', 'erp5_immobilisation', 'erp5_software_pdm',
'erp5_syncml', 'erp5_workflow', 'erp5_wizard', 'erp5_configurator',
'erp5_syncml', 'erp5_workflow', 'erp5_configurator',
'erp5_configurator_wizard', 'erp5_base', 'erp5_pdm',
'erp5_core_proxy_field_legacy'):
if result.startswith(skin_folder):
......
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights
# Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this
# distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
""" Classes: ERP5RemoteUserManager
"""
from Products.ERP5Type.Globals import InitializeClass
from AccessControl import ClassSecurityInfo
from AccessControl.SecurityManagement import getSecurityManager,\
setSecurityManager, newSecurityManager
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Products.PluggableAuthService.utils import classImplements
from Products.PluggableAuthService.interfaces.plugins import IAuthenticationPlugin, \
IUserEnumerationPlugin
from Products.ERP5Type.Cache import CachingMethod
from DateTime import DateTime
from Products.ERP5Security.ERP5UserManager import ERP5UserManager, _AuthenticationFailure
from Products import ERP5Security
from BTrees.OOBTree import OOBTree
from zLOG import LOG, INFO, WARNING
import socket
from AccessControl.AuthEncoding import pw_validate, pw_encrypt
manage_addERP5RemoteUserManagerForm = PageTemplateFile(
'../dtml/ERP5Security_addERP5RemoteUserManager', globals(),
__name__='manage_addERP5RemoteUserManagerForm' )
def addERP5RemoteUserManager(dispatcher, id, title=None, REQUEST=None):
""" Add a ERP5UserManager to a Pluggable Auth Service. """
eum = ERP5RemoteUserManager(id, title)
dispatcher._setObject(eum.getId(), eum)
if REQUEST is not None:
REQUEST['RESPONSE'].redirect(
'%s/manage_workspace'
'?manage_tabs_message='
'ERP5RemoteUserManager+added.'
% dispatcher.absolute_url())
class ERP5RemoteUserManager(ERP5UserManager):
""" PAS plugin for managing users in remote ERP5 instance
"""
meta_type = 'ERP5 Remote User Manager'
security = ClassSecurityInfo()
remote_authentication_cache = None
def _doRemoteAuthentication(self, login, password):
# Do remote authentication with local ZODB caching
# Thanks to this it is possible to login to instance, even
# if master authentication server is down
#
# socket.sslerror and socket.error are assumed as acceptable ones
# and invoke authentication against locally available cache of
# users
#
# any other error is assumed as fatal and results in disallowing
# authentication and clearing local cache
if self.remote_authentication_cache is None:
self.remote_authentication_cache = OOBTree()
portal = self.getPortalObject()
encrypted_password = pw_encrypt(password)
callRemoteProxyMethod = portal.portal_wizard.callRemoteProxyMethod
erp5_uid = portal.ERP5Site_getExpressInstanceUid()
try:
# XXX: This mix of passed parameters is based on
# WizardTool_authenticateCredentials. As current implementation
# shall be bug-to-bug compatible with previous one, kept such
# behaviour
result = int(callRemoteProxyMethod(
'Base_authenticateCredentialsFromExpressInstance',
use_cache = 0,
ignore_exceptions = 0,
**{'login': login,
'password': password,
'erp5_uid': erp5_uid}))
except socket.error:
# issue with socket, read from "ZODB cache"
LOG('ERP5RemoteUserManager', INFO, 'Socket issue with server, '
'used local cache', error=True)
stored_encrypted_password = self.remote_authentication_cache.get(
login, None)
result = int(stored_encrypted_password is not None and pw_validate(
stored_encrypted_password, password))
except: # XXX: It would be better to do except Exception, but
# to-be-bug compatible with WizardTool_authenticateCredentials
# is better to catch the same way
# any other issue, work like WizardTool_authenticateCredentials
# XXX: To be fine tuned
LOG('ERP5RemoteUserManager', WARNING, 'Not supported exception '
'assuming that authentication failed', error=True)
result = 0
# clear local cache
if login in self.remote_authentication_cache:
del self.remote_authentication_cache[login]
else:
# update ZODB cache
if result == 1:
# successfully logged in
stored_encrypted_password = self.remote_authentication_cache\
.get(login, None)
if stored_encrypted_password is None or \
not pw_validate(stored_encrypted_password, password):
# not yet in cache or changed on server
self.remote_authentication_cache[login] = encrypted_password
else:
# wrong login, so clear local cache
if login in self.remote_authentication_cache:
del self.remote_authentication_cache[login]
return result
#
# IAuthenticationPlugin implementation
#
security.declarePrivate( 'authenticateCredentials' )
def authenticateCredentials(self, credentials):
""" See IAuthenticationPlugin.
o We expect the credentials to be those returned by
ILoginPasswordExtractionPlugin.
"""
# Forbidden the usage of the super user.
if credentials.get('login') == ERP5Security.SUPER_USER:
return None
def _authenticateCredentials(login, password, path):
if not login or not password:
return None
user_list = self.getUserByLogin(login)
if not user_list:
raise _AuthenticationFailure()
user = user_list[0]
sm = getSecurityManager()
if sm.getUser().getId() != ERP5Security.SUPER_USER:
newSecurityManager(self, self.getUser(ERP5Security.SUPER_USER))
try:
# get assignment
assignment_list = [x for x in user.contentValues(portal_type="Assignment") \
if x.getValidationState() == "open"]
valid_assignment_list = []
# check dates if exist
login_date = DateTime()
for assignment in assignment_list:
if assignment.getStartDate() is not None and \
assignment.getStartDate() > login_date:
continue
if assignment.getStopDate() is not None and \
assignment.getStopDate() < login_date:
continue
valid_assignment_list.append(assignment)
# validate to remote ERP5 instance
is_authenticated = self._doRemoteAuthentication(login, password)
if is_authenticated:
return login, login
finally:
setSecurityManager(sm)
raise _AuthenticationFailure()
_authenticateCredentials = CachingMethod(_authenticateCredentials,
id='ERP5RemoteUserManager_authenticateCredentials',
cache_factory='erp5_content_short')
try:
return _authenticateCredentials(
login=credentials.get('login'),
password=credentials.get('password'),
path=self.getPhysicalPath())
except _AuthenticationFailure:
return None
classImplements( ERP5RemoteUserManager
, IAuthenticationPlugin
, IUserEnumerationPlugin
)
InitializeClass(ERP5RemoteUserManager)
##############################################################################
#
# Copyright (c) 2006-2010 Nexedi SA and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
# Ivan Tyagov <ivan@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from AccessControl import ClassSecurityInfo
from ZPublisher.HTTPRequest import FileUpload
from Products.ERP5Type.Globals import DTMLFile
from Products.ERP5Type.Accessor.Constant import PropertyGetter as \
ConstantGetter
from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions
from Products.ERP5Wizard import _dtmldir
from Products.CMFCore.utils import getToolByName
from zLOG import LOG, INFO, ERROR
from cStringIO import StringIO
from UserDict import UserDict
import xmlrpclib, socket, traceback, urllib, urllib2, base64, cgi
from AccessControl.SecurityManagement import setSecurityManager
from Products.ERP5Type.Utils import _setSuperSecurityManager
import zLOG, cookielib
from urlparse import urlparse, urlunparse
from base64 import encodestring, decodestring
from urllib import quote, unquote
from DateTime import DateTime
from Products.PluggableAuthService.interfaces.plugins import \
IAuthenticationPlugin
from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Wizard.PAS.ERP5RemoteUserManager import ERP5RemoteUserManager
from Products.PluggableAuthService.PluggableAuthService import PluggableAuthService as PluggableAuthServiceTool
# global (RAM) cookie storage
cookiejar = cookielib.CookieJar()
last_loggedin_user_and_password = None
referer = None
installation_status = {'bt5': {'current': 0,
'all': 0,},
'activity_list': [],}
# cookie name to store user's preferred language name
LANGUAGE_COOKIE_NAME = 'configurator_user_preferred_language'
def getAvailableLanguageFromHttpAcceptLanguage(http_accept_language,
available_language_list,
default='en'):
for language_set in http_accept_language.split(','):
language_tag = language_set.split(';')[0]
language = language_tag.split('-')[0]
if language in available_language_list:
return language
return default
def _isUserAcknowledged(cookiejar):
""" Is user authenticated to remote system through a cookie. """
for cookie in cookiejar:
if cookie.name == '__ac' and cookie.value != '':
return 1
return 0
def _getAcCookieFromServer(url, opener, cookiejar, username, password,
header_dict = {}):
""" get __ac cookie from server """
data = urllib.urlencode({'__ac_name': username,
'__ac_password': password})
request = urllib2.Request(url, data, header_dict)
f = opener.open(request)
return f
class GeneratorCall(UserDict):
""" Class use to generate/interpret XML-RPC call for the wizard. """
_binary_keys = ("data", "filedata", "previous", "next",)
_string_keys = ( "command", "server_buffer",)
def __init__(self, *args, **kw):
UserDict.__init__(self, *args, **kw)
self.convert_data = {}
for key in (self._binary_keys + self._string_keys):
self.setdefault(key, None)
def load(self, xmlrpccall):
""" Convert the xmlrpccall into the object. """
self.convert_data = xmlrpclib.loads(xmlrpccall)[0][0]
for binary_key in self._binary_keys:
if self.convert_data[binary_key] is not None:
if isinstance(self.convert_data[binary_key], list):
self[binary_key] = []
for item in self.convert_data[binary_key]:
self[binary_key].append(self._decodeData(item[16:-18]))
else:
self[binary_key] = self._decodeData(self.convert_data[binary_key]
[16:-18])
## load string keys
for string_key in self._string_keys:
self[string_key] = self.convert_data[string_key]
def dump(self):
""" Dump object to a xmlrpccall. """
for binary_key in self._binary_keys:
if isinstance(self[binary_key], list):
## we have list of values
self.convert_data[binary_key] = []
for item in self[binary_key]:
self.convert_data[binary_key].append(self._encodeData(item))
else:
if self[binary_key] is not None:
self.convert_data[binary_key] = self._encodeData(self[binary_key])
else:
self.convert_data[binary_key] = None
for string_key in self._string_keys:
self.convert_data[string_key] = self[string_key]
return xmlrpclib.dumps((self.convert_data,), 'GeneratorAnswer',
allow_none=1)
def _decodeData(self, data):
""" Decode data. """
binary_decoder = xmlrpclib.Binary()
binary_decoder.decode(data)
return binary_decoder.data
def _encodeData(self, data):
""" Encode data to transmittable text. """
fp = StringIO()
try:
# data might be ERP5Type.Message.Message instance.
xmlrpclib.Binary(data=str(data)).encode(fp)
return fp.getvalue()
finally:
fp.close()
def getPicklableRequest(REQUEST):
""" Return 'pickable' request """
picklable_request = {}
for key, value in REQUEST.items():
picklable_request[key] = str(value)
return picklable_request
def _generateErrorXML(error_message):
""" Generate HTML for displaying an error. """
log_message = traceback.format_exc()
return '<table><tr><td class="error">%s</td></tr></table>' % error_message
## server to local preferences id translation table
_server_to_preference_ids_map = {'client_id': 'preferred_express_client_uid',
'current_bc_index':
'preferred_express_erp5_uid',
'password': 'preferred_express_password',
'user_id': 'preferred_express_user_id',}
class WizardTool(BaseTool):
""" WizardTool is able to generate custom business templates. """
id = 'portal_wizard'
meta_type = 'ERP5 Wizard Tool'
portal_type = 'Wizard Tool'
isPortalContent = ConstantGetter('isPortalContent', value=True)
property_sheets = ()
security = ClassSecurityInfo()
security.declareProtected(Permissions.ManagePortal, 'manage_overview')
manage_overview = DTMLFile('explainWizardTool', _dtmldir )
# Stop traversing a concatenated path after the proxy method.
def __before_publishing_traverse__(self, self2, request):
path = request['TraversalRequestNameStack']
if path and path[-1] == 'proxy':
subpath = path[:-1]
subpath.reverse()
request.set('traverse_subpath', subpath)
# initialize our root proxy URL which we use for a referer
global referer
path[:-1] = []
if referer is None:
referer = '%s/portal_wizard/proxy/%s/view' % (
self.getPortalObject().absolute_url(),
'/'.join(subpath[:3]))
def _getProxyURL(self, subpath='', query=''):
# Helper method to construct an URL appropriate for proxying a request.
# This makes sure that URLs generated by absolute_url at a remote site
# will be always towards the proxy method again.
#
# Note that the code assumes that VirtualHostBase is visible. The setting
# of a front-end server must allow this.
#
# This should generate an URL like this:
#
# http://remotehost:9080/VirtualHostBase/http/localhost:8080/VirtualHostRoot/_vh_erp5/_vh_portal_wizard/_vh_proxy/erp5/person_module/2
part_list = []
server_url = self.getServerUrl().rstrip('/')
part_list.append(server_url)
part_list.append('VirtualHostBase')
portal_url = self.getPortalObject().absolute_url()
scheme, rest = urllib.splittype(portal_url)
addr, path = urllib.splithost(rest)
host, port = urllib.splitnport(addr, scheme == 'http' and 80 or 443)
part_list.append(scheme)
part_list.append('%s:%s' % (host, port))
part_list.append('VirtualHostRoot')
method_path = self.absolute_url_path() + '/proxy'
part_list.extend(('_vh_' + p for p in method_path.split('/') if p))
server_root = self.getServerRoot().strip('/')
if isinstance(subpath, (list, tuple)):
subpath = '/'.join(subpath)
if not subpath.startswith(server_root):
part_list.append(server_root)
part_list.append(subpath)
url = '/'.join((p for p in part_list if p))
if query:
url = url + '?' + query
return url
def _getSubsribedUserAndPassword(self):
"""Retrieve the username and password for the subscription from
the system."""
user = CachingMethod(self.getExpressConfigurationPreference,
'WizardTool_preferred_express_user_id',
cache_factory='erp5_content_long')(
'preferred_express_user_id', '')
pw = CachingMethod(self.getExpressConfigurationPreference,
'WizardTool_preferred_express_password',
cache_factory='erp5_content_long')(
'preferred_express_password', '')
return (user, pw)
# This is a custom opener director for not handling redirections
# and errors automatically. This is necessary because the proxy
# should pass all results to a client as they are.
simple_opener_director = urllib2.OpenerDirector()
for name in ('ProxyHandler', 'UnknownHandler', \
'HTTPHandler', 'FTPHandler',
'FileHandler', 'HTTPSHandler',):
handler = getattr(urllib2, name, None)
if handler is not None:
simple_opener_director.add_handler(handler())
# add cookie support
simple_opener_director.add_handler(urllib2.HTTPCookieProcessor(cookiejar))
security.declareProtected(Permissions.View, 'proxy')
def proxy(self, **kw):
"""Proxy a request to a server."""
global cookiejar, referer, last_loggedin_user_and_password
if self.REQUEST['REQUEST_METHOD'] != 'GET':
# XXX this depends on the internal of HTTPRequest.
pos = self.REQUEST.stdin.tell()
self.REQUEST.stdin.seek(0)
# XXX if filesize is too big, this might cause a problem.
data = self.REQUEST.stdin.read()
self.REQUEST.stdin.seek(pos)
else:
data = None
content_type = self.REQUEST.get_header('content-type')
# XXX if ":method" trick is used, then remove it from subpath.
if self.REQUEST.traverse_subpath:
if data is not None:
user_input = data
else:
user_input = self.REQUEST.QUERY_STRING
if user_input:
mark = ':method'
content_type_value = None
content_type_dict = None
if content_type:
content_type_value, content_type_dict = cgi.parse_header(
content_type)
if content_type_value == 'multipart/form-data':
fp = StringIO(user_input)
user_input_dict = cgi.parse_multipart(fp, content_type_dict)
else:
user_input_dict = cgi.parse_qs(user_input)
for i in user_input_dict:
if i.endswith(mark):
method_name = i[:-len(mark)]
method_path = method_name.split('/')
if self.REQUEST.traverse_subpath[-len(method_path):]==method_path:
del self.REQUEST.traverse_subpath[-len(method_path):]
break
url = self._getProxyURL(self.REQUEST.traverse_subpath,
self.REQUEST['QUERY_STRING'])
# XXX this will send the password unconditionally!
# I hope https will be good enough.
header_dict = {}
user_and_password = self._getSubsribedUserAndPassword()
if (len(user_and_password)==2 and
user_and_password[0] and user_and_password[1]):
if user_and_password!=last_loggedin_user_and_password:
# credentials changed we need to renew __ac cookie from server as well
cookiejar.clear()
# try login to server only once using cookie method
if not _isUserAcknowledged(cookiejar):
server_url = self.getServerUrl()
f = _getAcCookieFromServer('%s/WebSite_login' %server_url,
self.simple_opener_director,
cookiejar,
user_and_password[0],
user_and_password[1])
# if server doesn't support cookie authentication try basic
# authentication
if not _isUserAcknowledged(cookiejar):
auth = 'Basic %s' % base64.standard_b64encode('%s:%s' %
user_and_password)
header_dict['Authorization'] = auth
# save last credentials we passed to server
last_loggedin_user_and_password = user_and_password
if content_type:
header_dict['Content-Type'] = content_type
# send locally saved cookies to remote web server
if not header_dict.has_key('Cookie'):
header_dict['Cookie'] = ''
for cookie in cookiejar:
# unconditionally send all cookies (no matter if expired or not) as URL
# is always the same
header_dict['Cookie'] += '%s=%s;' %(cookie.name, cookie.value)
# include cookies from local browser (like show/hide tabs) which are set
# directly by client JavaScript code (i.e. not sent from server)
for cookie_name, cookie_value in self.REQUEST.cookies.items():
header_dict['Cookie'] += '%s=%s;' %(cookie_name, cookie_value)
# add HTTP referer (especially useful in Localizer when changing language)
header_dict['REFERER'] = self.REQUEST.get('HTTP_REFERER', None) or referer
request = urllib2.Request(url, data, header_dict)
f = self.simple_opener_director.open(request)
try:
data = f.read()
metadata = f.info()
response = self.REQUEST.RESPONSE
if f.code> 300 and f.code <400:
# adjust return url which my contain proxy URLs as arguments
location = metadata.getheader('location')
if location is not None:
parsed_url = list(urlparse(location))
local_site_url_prefix = urllib.quote(
'%s/portal_wizard/proxy' % self.getPortalObject().absolute_url())
remote_url_parsed = urlparse(self.getServerUrl())
remote_site_url_prefix = '%s://%s/kb' %(remote_url_parsed[0],
remote_url_parsed[1])
# fix arguments for returned location URL
parsed_url[4] = parsed_url[4].replace(local_site_url_prefix,
remote_site_url_prefix)
response['location'] = urlunparse(parsed_url)
response.setStatus(f.code, f.msg)
response.setHeader('content-type', metadata.getheader('content-type'))
# FIXME this list should be confirmed with the RFC 2616.
for k in ('uri', 'cache-control', 'last-modified',
'etag', 'if-matched', 'if-none-match',
'if-range', 'content-language', 'content-range'
'content-location', 'content-md5', 'expires',
'content-encoding', 'vary', 'pragma', 'content-disposition',
'content-length', 'age'):
if k in metadata:
response.setHeader(k, metadata.getheader(k))
return data
finally:
f.close()
def _getRemoteWitchTool(self, url, user_name=None, password=None):
"""
Return remote portal_witch tool interface.
"""
handle = self.getPortalObject().portal_web_services.connect(
url = url,
user_name = user_name,
password = password,
transport = 'xml-rpc')
return handle.portal_witch
def callRemoteProxyMethod(self, distant_method, server_url=None,
use_cache=1, ignore_exceptions=1, **kw):
""" Call proxy method on server. """
configurator_user_preferred_language = self\
.getConfiguratorUserPreferredLanguage()
def wrapper(distant_method, **kw):
return self._callRemoteMethod(
distant_method,
use_proxy=1,
ignore_exceptions=ignore_exceptions, **kw)['data']
if use_cache:
wrapper = CachingMethod(wrapper,
id = 'callRemoteProxyMethod_%s_%s'
%(distant_method,
configurator_user_preferred_language),
cache_factory = 'erp5_ui_medium')
rc = wrapper(distant_method, **kw)
return rc
def _callRemoteMethod(self, distant_method, server_url=None, use_proxy=0,
ignore_exceptions=1, **kw):
""" Call remote method on server and get result. """
result_call = GeneratorCall()
user_name = None
password = None
if server_url is None:
# calculate it
server_url = self.getServerUrl() + self.getServerRoot()
# include authentication if possible
user_and_password = self._getSubsribedUserAndPassword()
if (len(user_and_password)==2 and
user_and_password[0] and user_and_password[1]):
user_name, password = user_and_password
witch_tool = self._getRemoteWitchTool(server_url, user_name, password)
parameter_dict = self.REQUEST.form.copy()
if use_proxy:
# add remote method arguments
parameter_dict['method_id'] = distant_method
parameter_dict['method_kw'] = kw
distant_method = 'proxyMethodHandler'
## add client arguments
self._updateParameterDictWithServerInfo(parameter_dict)
## handle file upload
self._updateParameterDictWithFileUpload(parameter_dict)
message = None
## call remote method
try:
method = getattr(witch_tool, distant_method)
html = method(parameter_dict)
except socket.error, message:
html = _generateErrorXML("""Cannot contact the server: %s.
Please check your network settings.""" %
server_url)
zLOG.LOG('Wizard Tool socket error', zLOG.ERROR, message)
result_call.update({"command": "show",
"data": html,
"next": None,
"previous": None})
except xmlrpclib.ProtocolError, message:
html = _generateErrorXML("""The server %s refused to reply.
Please contact erp5-dev@erp5.org""" %
server_url)
zLOG.LOG('Wizard Tool xmlrpc protocol error', zLOG.ERROR, message)
result_call.update({"command": "show",
"data": html,
"next": None,
"previous": None})
except xmlrpclib.Fault, message:
html = _generateErrorXML("Error/bug inside the server: %s." %server_url)
zLOG.LOG('Wizard Tool xmlrpc fault', zLOG.ERROR, message)
result_call.update({"command": "show",
"data": html,
"next": None,
"previous": None})
else:
result_call.load(html)
command = result_call["command"]
html = result_call["data"]
if message is not None and not ignore_exceptions:
# raise last caught exception
raise
return result_call
def _setServerInfo(self, **kw):
""" Save to local Zope client address info. """
global _server_to_preference_ids_map
for item, value in kw.items():
if item in _server_to_preference_ids_map.keys():
## save persistently (as preference)
self.setExpressConfigurationPreference(
_server_to_preference_ids_map[item],
value)
def getConfiguratorUserPreferredLanguage(self):
""" Get configuration language as selected by user """
REQUEST = getattr(self, 'REQUEST', None)
configurator_user_preferred_language = None
if REQUEST is not None:
# language value will be in cookie or REQUEST itself.
configurator_user_preferred_language = REQUEST.get(LANGUAGE_COOKIE_NAME,
None)
if configurator_user_preferred_language is None:
# Find a preferred language from HTTP_ACCEPT_LANGUAGE
available_language_list = [i[1] for i in self\
.WizardTool_getConfigurationLanguageList()]
configurator_user_preferred_language = \
getAvailableLanguageFromHttpAcceptLanguage(
REQUEST.get('HTTP_ACCEPT_LANGUAGE', 'en'),
available_language_list)
if configurator_user_preferred_language is None:
configurator_user_preferred_language = 'en'
return configurator_user_preferred_language
def _updateParameterDictWithServerInfo(self, parameter_dict):
"""Updates parameter_dict to include local saved server info settings. """
global _server_to_preference_ids_map
for key, value in _server_to_preference_ids_map.items():
parameter_dict[key] = self.getExpressConfigurationPreference(value, None)
## add local ERP5 instance url
parameter_dict['erp5_url'] = self.getPortalObject().absolute_url()
# add user preferred language
parameter_dict['user_preferred_language'] = self.\
getConfiguratorUserPreferredLanguage()
# new way - reuse, if exist erp5_site_global_id
erp5_site_global_id = getattr(self.getPortalObject(),
'erp5_site_global_id', None)
if erp5_site_global_id is not None:
# XXX: is overriding of current_bc_index required?
parameter_dict['erp5_site_global_id'] = erp5_site_global_id
def _updateParameterDictWithFileUpload(self, parameter_dict):
"""Updates parameter_dict to replace file upload with their file content,
encoded as XML-RPC Binary
"""
for key, value in parameter_dict.items():
if isinstance(value, FileUpload):
pos = value.tell()
value.seek(0)
parameter_dict[key] = xmlrpclib.Binary(value.read())
value.seek(pos)
def _importBT5FileData(self, bt5_filename, bt5_filedata):
""" Import bt5 file content. """
bt5_io = StringIO(bt5_filedata)
portal_templates = getToolByName(self.getPortalObject(),
'portal_templates')
try:
business_template = portal_templates.importFile(import_file=bt5_io,
batch_mode=1)
except:
## importing of generated bt5 failed
business_template = None
LOG("Wizard", ERROR, "[FAIL] Import of Nexedi Configurator bt5 file(%s)"
% bt5_filename)
raise
bt5_io.close()
#install bt5
business_template.install()
security.declareProtected(Permissions.ModifyPortalContent,
'installBT5FilesFromServer')
def installBT5FilesFromServer(self,
server_response,
execute_after_setup_script=True,
install_standard_bt5=True,
install_customer_bt5=True,
use_super_manager=True):
""" Install or update BT5 files which we get from remote server. """
# XXX-Luke: This methods makes very long transaction:
# * download business templates
# * install business templates
# * run after script
# It leads in real world to never ending process, as any other activity
# in asynchronous system can lead to conflict error and transaction
# restart, and again...forever.
#
# To solve:
# * use activity system
# * download, install and run after script in activities
# * use proper tags to have sequence
# * expose tag initialERP5Setup
global installation_status
if use_super_manager:
# set current security manager to owner of site
original_security_manager = _setSuperSecurityManager(
self.getPortalObject())
portal = self.getPortalObject()
bt5_files = server_response.get("filedata", [])
server_buffer = server_response.get("server_buffer", None)
if server_buffer is None:
# server doesn't comform protocol which means a possible server error
raise ValueError("Witch server configuration error")
bt5_filenames = server_buffer.get("filenames", [])
portal_templates = getToolByName(portal, 'portal_templates')
counter = 0
LOG("Wizard", INFO,
"Starting installation for %s" %' '.join(bt5_filenames))
installation_status['bt5']['all'] = len(bt5_files)
# execute_after_setup_script = install_standard_bt5 =
# install_customer_bt5 = False # dev mode
for bt5_id in bt5_filenames:
if bt5_id.startswith('http://') or bt5_id.startswith('file://') :
## direct download of bt5 files available
if install_standard_bt5:
bt = portal_templates.download(bt5_id)
bt.install()
installation_status['bt5']['current'] = counter + 1
LOG("Wizard", INFO,
"[OK] standard bt5 installation (HTTP) from %s" %bt5_id)
else:
## remote system supplied file content
if install_customer_bt5:
bt5_filedata = bt5_files[counter]
self._importBT5FileData(bt5_id, bt5_filedata)
installation_status['bt5']['current'] = counter + 1
LOG("Wizard", INFO,
"[OK] customized bt5 installation (XML-RPC) %s, %s bytes" %
(bt5_id, len(bt5_filedata)))
## ..
counter += 1
## can we execute after setup script that will finish installation on
## client side?
bt5_after_setup_script_id = server_response["server_buffer"].get(
"after_setup_script_id", None)
if bt5_after_setup_script_id is None and \
self.getExpressConfigurationPreference(
'preferred_express_configuration_status', False):
## we already have stored after setup script id
bt5_after_setup_script_id = self.getExpressConfigurationPreference(
'preferred_express_after_setup_script_id', None)
if execute_after_setup_script and bt5_after_setup_script_id is not None:
## Execute script provided (if) in customer specific business template.
bt5_customer_template_id = server_response["server_buffer"]['filenames'
][-1]
bt5_customer_template_id = bt5_customer_template_id.replace('.bt5', '')
after_script = getattr(self, bt5_after_setup_script_id, None)
if after_script is not None:
after_script_result = after_script(
customer_template_id = bt5_customer_template_id)
LOG("Wizard", INFO,"[OK] execution of after setup script %s (for bt5 "
"%s)%s" %(after_script.getId(), bt5_customer_template_id,
after_script_result))
## mark this ERP5 instance as configured
self.setExpressConfigurationPreference(
'preferred_express_configuration_status', 1)
self.setExpressConfigurationPreference(
'preferred_express_after_setup_script_id', bt5_after_setup_script_id)
# Make sure that the site status is reloaded.
portal.portal_caches.clearAllCache()
LOG("Wizard", INFO,
"Completed installation for %s" %' '.join(bt5_filenames))
if use_super_manager:
setSecurityManager(original_security_manager)
######################################################
## Navigation ##
######################################################
#security.declareProtected(Permissions.ModifyPortalContent, 'login')
def remoteLogin(self, REQUEST):
""" Login client and show next form. """
client_id = None
user_id = REQUEST.get('field_my_ac_name', None) or self\
.getExpressConfigurationPreference('preferred_express_user_id')
REQUEST.form['field_my_ac_name'] = user_id
password = REQUEST.get('field_my_ac_password', '')
came_from_method = REQUEST.get('field_my_came_from_method', '')
## call remote server
response = self._callRemoteMethod("getIdentification")
command = response["command"]
if command == "show":
## server wants some more info - i.e possible
## selection of working business configuration
if response.get('server_buffer', None) is not None:
client_id = response['server_buffer'].get('client_id', None)
self._setServerInfo(user_id=user_id,
password=password,
client_id=client_id)
return self.WizardTool_dialogForm(form_html=response["data"])
elif command == "next":
self._setServerInfo(user_id=user_id,
#password=password,
client_id=response['server_buffer'].get('client_id',
None),
current_bc_index=response['server_buffer'].get(
'current_bc_index', None))
# set encoded __ac_express cookie at client's browser
__ac_express = quote(encodestring(password))
expires = (DateTime() + 1).toZone('GMT').rfc822()
REQUEST.RESPONSE.setCookie('__ac_express',
__ac_express,
expires = expires)
REQUEST.set('__ac_express', __ac_express)
return self.next(REQUEST=REQUEST)
elif command == "login":
## invalid user/password
self.REQUEST.RESPONSE.redirect(
'portal_wizard/%s?field_my_ac_name=%s&portal_status_message=%s'
%(came_from_method, user_id, response['server_buffer']['message']))
return
def login(self, REQUEST):
""" Login client and show next form. """
user_id = self.getExpressConfigurationPreference(
'preferred_express_user_id')
password = REQUEST.get('field_my_ac_password', '')
if self._isCorrectConfigurationKey(user_id, password):
# set user preferred configuration language
user_preferred_language = REQUEST.get(
'field_my_user_preferred_language', None)
if user_preferred_language:
# Set language value to request so that next page after login
# can get the value. Because cookie value is available from
# next request.
REQUEST.set(LANGUAGE_COOKIE_NAME, user_preferred_language)
REQUEST.RESPONSE.setCookie(LANGUAGE_COOKIE_NAME,
user_preferred_language,
path='/',
expires=(DateTime()+30).rfc822())
# set encoded __ac_express cookie at client's browser
__ac_express = quote(encodestring(password))
expires = (DateTime() + 1).toZone('GMT').rfc822()
REQUEST.RESPONSE.setCookie('__ac_express',
__ac_express,
expires = expires)
REQUEST.set('__ac_express', __ac_express)
return self.next(REQUEST=REQUEST)
else:
# incorrect user_id / password
REQUEST.set('portal_status_message',
self.callRemoteProxyMethod('WizardTool_viewIncorrectConfigu'
'rationKeyMessageRenderer'))
return self.view()
def _isCorrectConfigurationKey(self, user_id, password):
""" Is configuration key correct """
uf = self.getPortalObject().acl_users
for plugin_name, plugin in uf._getOb('plugins').listPlugins(
IAuthenticationPlugin):
if plugin.authenticateCredentials(
{'login':user_id, 'password': password}) is not None:
return 1
return 0
def _isUserAllowedAccess(self):
""" Can user access locally portal_wizard """
password = self.REQUEST.get('__ac_express', None)
if password is not None:
user_id = self.getExpressConfigurationPreference(
'preferred_express_user_id')
password = decodestring(unquote(password))
return self._isCorrectConfigurationKey(user_id, password)
return 0
#security.declareProtected(Permissions.ModifyPortalContent, 'next')
def next(self, REQUEST):
""" Validate settings and return a new form to the user. """
# check if user is allowed to access service
if not self._isUserAllowedAccess():
REQUEST.set('portal_status_message', self.Base_translateString(
'Incorrect Configuration Key'))
return self.view()
response = self._callRemoteMethod("next")
if isinstance(response['server_buffer'], dict):
## Remote server may request us to save some data.
self._setServerInfo(**response['server_buffer'])
## Parse server response
command = response["command"]
html = response["data"]
if command == "show":
return self.WizardTool_dialogForm(previous=response['previous'],
form_html=html,
next = response['next'])
elif command == "update":
return self.next(REQUEST=REQUEST)
elif command == "login":
REQUEST.set('portal_status_message', html)
return self.view(REQUEST=REQUEST)
elif command == "install":
return self.startInstallation(REQUEST=REQUEST)
#security.declareProtected(Permissions.ModifyPortalContent, 'previous')
def previous(self, REQUEST):
""" Display the previous form. """
# check if user is allowed to access service
if not self._isUserAllowedAccess():
REQUEST.set('portal_status_message', self.Base_translateString(
'Incorrect Configuration Key'))
return self.view()
response = self._callRemoteMethod('previous')
command = response["command"]
html = response['data']
if command == "show":
return self.WizardTool_dialogForm(previous=response['previous'],
form_html=html,
next=response['next'])
elif command == "login":
REQUEST.set('portal_status_message', html)
return self.view(REQUEST=REQUEST)
security.declarePublic('getInstallationStatusReportFromClient')
def getInstallationStatusReportFromClient(self,
active_process_id=None, REQUEST=None):
""" Query local ERP5 instance for installation status.
If installation is over the installation activities and reindexing
activities should not exists.
"""
global installation_status
portal_activities = getToolByName(self.getPortalObject(),
'portal_activities')
is_bt5_installation_over = (portal_activities.countMessageWithTag(
'initialERP5Setup')==0)
if 0 == len(portal_activities.getMessageList()) and \
is_bt5_installation_over:
html = self.WizardTool_viewSuccessfulConfigurationMessageRenderer()
else:
if is_bt5_installation_over:
# only if bt5s are installed start tracking number of activities
activity_list = portal_activities.getMessageList()
installation_status['activity_list'].append(len(activity_list))
html = self.WizardTool_viewRunningInstallationMessage(
installation_status = installation_status)
# set encoding as this is usually called from asynchronous JavaScript call
self.REQUEST.RESPONSE.setHeader('Content-Type',
'text/html; charset=utf-8')
return html
security.declarePublic('getInstallationStatusReportFromServer')
def getInstallationStatusReportFromServer(self, active_process_id=None,
REQUEST=None):
""" Query remote server (usually only once for some installation status report """
response = self._callRemoteMethod("getInstallationStatusReport")
html = response["data"]
return html
security.declareProtected(Permissions.ModifyPortalContent, 'startInstallation')
def startInstallation(self, REQUEST):
""" Start installation process as an activity which will query generation
server and download/install bt5 template files and meanwhile offer
user a nice GUI to observe what's happening. """
global installation_status
# init installation status
installation_status['bt5']['all'] = 0
installation_status['bt5']['current'] = 0
installation_status['activity_list'] = []
active_process = self.portal_activities.newActiveProcess()
REQUEST.set('active_process_id', active_process.getId())
request_restore_dict = {'__ac_express': self.REQUEST.get('__ac_express',
None),}
self.activate(active_process=active_process, tag = 'initialERP5Setup'
).initialERP5Setup(request_restore_dict)
return self.Wizard_viewInstallationStatus(REQUEST)
security.declareProtected(Permissions.ModifyPortalContent,
'initialERP5Setup')
def initialERP5Setup(self, request_restore_dict={}):
""" Get from remote generation server customized bt5 template files
and then install them. """
# restore some REQUEST variables as this method is executed in an activity
# and there's no access to real original REQUEST
for key, value in request_restore_dict.items():
self.REQUEST.set(key, value)
self.REQUEST.form['wizard_request_type'] = 'initial_setup'
# calculate server_url, because after bt5 installation reindexing is
# started which will make it impossible to get preferences items
server_url = self.getServerUrl() + self.getServerRoot()
server_response = self._callRemoteMethod(
'getBT5FilesForBusinessConfiguration', server_url)
## save erp5_uid which will make it possible to distinguish different
## Business Configuration for client
if server_response.get('server_buffer', None) is not None:
current_bc_index = server_response['server_buffer'].get(
'current_bc_index', None)
if current_bc_index is not None:
self._setServerInfo(current_bc_index = current_bc_index)
self.installBT5FilesFromServer(server_response, True)
server_response = self._callRemoteMethod('finalizeInstallation',
server_url)
LOG("Wizard", INFO,
"Successfully installed generated business configuration from %s" %
self.getServerUrl())
security.declareProtected(Permissions.ModifyPortalContent, 'repair')
def repair(self):
""" Repair broken ERP5 instance. This will install all business templates
for ERP5 instance as specified in its business configuration. """
self.REQUEST.form['wizard_request_type'] = 'repair'
server_response = self._callRemoteMethod(
'getBT5FilesForBusinessConfiguration')
if server_response['command'] == "install":
active_process = self.portal_activities.newActiveProcess()
self.activate(active_process=active_process).installBT5FilesFromServer(
server_response, True)
html = server_response['data']
LOG("Wizard", INFO,
"Start repair process for ERP5 instance from %s" %self.getServerUrl())
return self.WizardTool_dialogForm(form_html = html)
security.declareProtected(Permissions.ModifyPortalContent, 'update')
def update(self):
""" Update ERP5's instance standard business templates. """
self.REQUEST.form['wizard_request_type'] = 'update'
server_response = self._callRemoteMethod(
'getBT5FilesForBusinessConfiguration')
if server_response['command'] == "install":
active_process = self.portal_activities.newActiveProcess()
self.activate(active_process=active_process).installBT5FilesFromServer(
server_response,
execute_after_setup_script = False)
html = server_response['data']
LOG("Wizard", INFO,
"Start update process for ERP5 instance from %s" %self.getServerUrl())
return self.WizardTool_dialogForm(form_html = html)
security.declareProtected(Permissions.View, 'getServerUrl')
def getServerUrl(self):
return CachingMethod(self.getExpressConfigurationPreference,
'WizardTool_preferred_witch_tool_server_url',
cache_factory='erp5_content_long')(
'preferred_witch_tool_server_url', '')
security.declareProtected(Permissions.View, 'getServerRoot')
def getServerRoot(self):
return CachingMethod(self.getExpressConfigurationPreference,
'WizardTool_preferred_witch_tool_server_root',
cache_factory='erp5_content_long')(
'preferred_witch_tool_server_root', '')
security.declareProtected(Permissions.View,
'getExpressConfigurationPreference')
def getExpressConfigurationPreference(self, preference_id, default = None):
""" Get Express configuration preference """
original_security_manager = _setSuperSecurityManager(self.getPortalObject())
portal_preferences = getToolByName(self, 'portal_preferences')
preference_value = portal_preferences.getPreference(preference_id, default)
setSecurityManager(original_security_manager)
return preference_value
security.declareProtected(Permissions.ModifyPortalContent,
'setExpressConfigurationPreference')
def setExpressConfigurationPreference(self, preference_id, value):
""" Set Express configuration preference """
portal_preferences = getToolByName(self, 'portal_preferences')
if portal_preferences.getActivePreference() is not None:
portal_preferences.setPreference(preference_id, value)
security.declarePublic('isSingleSignOnEnabled')
def isSingleSignOnEnabled(self):
"""
Check that a ERP5 Remote User manager is
present as authentication plugin
"""
acl_users = getattr(self.getPortalObject(), 'acl_users')
if isinstance(acl_users , PluggableAuthServiceTool):
# List plugin which make authentication
plugin_list = acl_users.plugins.listPlugins(IAuthenticationPlugin)
for plugin_name, plugin_value in plugin_list:
# Try to find an ERP5RemoteUserManager
if isinstance(plugin_value, ERP5RemoteUserManager):
# ERP5RemoteUserManager was found but remains verify if
# the plugin is enabled or not.
return True
return False
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
"""
ERP5Wizard is a ERP5Configurator client.
"""
from Products.ERP5Type.Utils import initializeProduct, updateGlobals
import sys, Permissions
from AccessControl.Permissions import manage_users as ManageUsers
from Products.PluggableAuthService.PluggableAuthService import registerMultiPlugin
from Products.PluggableAuthService.permissions import ManageGroups
from Products.ERP5Wizard.PAS.ERP5RemoteUserManager import \
ERP5RemoteUserManager, manage_addERP5RemoteUserManagerForm, addERP5RemoteUserManager
this_module = sys.modules[ __name__ ]
document_classes = updateGlobals(this_module, globals(), permissions_module=Permissions)
registerMultiPlugin(ERP5RemoteUserManager.meta_type)
# Finish installation
def initialize(context):
import Document
from Tool import WizardTool
# Define object classes and tools
object_classes = ()
portal_tools = (WizardTool.WizardTool,)
content_classes = ()
content_constructors = ()
# Do initialization step
initializeProduct(context, this_module, globals(),
document_module=Document,
document_classes=document_classes,
object_classes=object_classes,
portal_tools=portal_tools,
content_constructors=content_constructors,
content_classes=content_classes)
# register ERP5Security plugin for Wizard
context.registerClass( ERP5RemoteUserManager
, permission=ManageUsers
, constructors=(
manage_addERP5RemoteUserManagerForm,
addERP5RemoteUserManager, )
, visibility=None
, icon='dtml/remote_user_manager_plugin.gif'
)
<h1 tal:replace="structure here/manage_page_header">Header</h1>
<h2 tal:define="form_title string:Add ERP5 Remote User Manager"
tal:replace="structure here/manage_form_title">Form Title</h2>
<p class="form-help">
ERP5 Remote User Manager applys the users managed in remote ERP5 instance's person module
to the Pluggable Authentication Service
</p>
<form action="addERP5RemoteUserManager" method="post">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
</div>
</td>
</tr>
</table>
</form>
<h1 tal:replace="structure here/manage_page_footer">Footer</h1>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<h3>Explain Wizard Tool</h3>
<p>
Wizard Tool provides a wizard-style user interface to
allow the user to configure a site easily.
</p>
<p>
You need to have a remote configurator site to exchange information
and ask configuration services.
</p>
<dtml-var manage_page_footer>
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
# Lukasz Nowak <luke@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5.ERP5Site import ERP5Site
from Products import ERP5Security
from Products.ERP5Type.Base import Base
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Wizard import addERP5RemoteUserManager
from Products.ERP5Wizard.Tool.WizardTool import GeneratorCall
import socket
import unittest
# portal_witch simulation
def proxyMethodHandler(self, kw):
"""Dummy proxyMethodHandler"""
# login as super user
newSecurityManager(self, self.getPortalObject().acl_users.getUserById(
ERP5Security.SUPER_USER))
data = getattr(self, kw['method_id'])(**kw['method_kw'])
response = GeneratorCall(data=data)
return response.dump()
Base.proxyMethodHandler = proxyMethodHandler
Base.security.declarePublic('proxyMethodHandler')
def Base_authenticateCredentialsFromExpressInstance(self, **kw):
person_list = self.portal_catalog(portal_type='Person',
reference=kw['login'])
if len(person_list) == 1:
if person_list[0].getTitle() == kw['password']:
return 1
return 0
Base.Base_authenticateCredentialsFromExpressInstance =\
Base_authenticateCredentialsFromExpressInstance
Base.security.declarePublic('Base_authenticateCredentialsFromExpressInstance')
# portal_wizard simulation
def ERP5Site_getExpressInstanceUid(self, **kw):
"""Dummy site it"""
return 'dummy_site_id'
ERP5Site.ERP5Site_getExpressInstanceUid =\
ERP5Site_getExpressInstanceUid
ERP5Site.security.declarePublic('ERP5Site_getExpressInstanceUid')
# portal_wizard patches
def raises_socket_error(self, *args, **kw):
raise socket.error
def raises_socket_sslerror(self, *args, **kw):
raise socket.sslerror
def raises_valueerror(self, *args, **kw):
raise ValueError
def raises_socket_timeout(self, *args, **kw):
raise socket.timeout
def raises_socket_gaierror(self, *args, **kw):
raise socket.gaierror
class TestERP5RemoteUserManager(ERP5TypeTestCase):
"""Low level tests of remote logging"""
def getBusinessTemplateList(self):
return (
'erp5_base',
'erp5_web_service',
'erp5_wizard',
)
base_type_portal_type = 'Base Type'
person_portal_type = 'Person'
system_preference_portal_type = 'System Preference'
erp5_remote_manager_id = 'erp5_remote_user_manager'
system_preference_id = 'TestERP5RemoteUserManager'
def setUpRemoteUserManager(self):
acl_users = self.portal.acl_users
addERP5RemoteUserManager(acl_users, self.erp5_remote_manager_id)
self.erp5_remote_manager = getattr(acl_users, self.erp5_remote_manager_id)
acl_users.erp5_login_users.manage_activateInterfaces([])
self.erp5_remote_manager.manage_activateInterfaces(['IAuthenticationPlugin', 'IUserEnumerationPlugin'])
self.commit()
def afterSetUp(self):
self.login = self.id()
self.password = self.login + 'password'
self.portal = self.getPortalObject()
self.createDummyWitchTool()
self.was_sso_enable = self.portal.portal_wizard.isSingleSignOnEnabled()
self.setUpRemoteUserManager()
self.person_module = self.portal.person_module
acl_users = self.portal.acl_users
# set preferences before each test, as test suite can have different
# ip/port after being saved and then loaded
self.setUpAuthenticationServerPreferences()
self.tic()
def beforeTearDown(self):
"""Clear everything"""
self.portal.acl_users.manage_delObjects(self.erp5_remote_manager_id)
self.portal.deleteContent('portal_witch')
self.removeAuthenticationServerPreferences()
self.tic()
def removeAuthenticationServerPreferences(self):
portal_preferences = self.portal.portal_preferences
if self.system_preference_id in portal_preferences.objectIds():
portal_preferences.deleteContent(self.system_preference_id)
self.portal.portal_caches.clearAllCache()
def setUpAuthenticationServerPreferences(self, server_url=None,
server_root=None):
if server_url is None:
server_url = self.portal.absolute_url() + '/'
if server_root is None:
self.getPortalId()
portal_preferences = self.portal.portal_preferences
# disable all existing system preferences
system_preference = portal_preferences.newContent(
portal_type=self.system_preference_portal_type,
id=self.system_preference_id,
preferred_witch_tool_server_url=server_url,
preferred_witch_tool_server_root=server_root,
)
system_preference.enable()
self.assertEqual('global', system_preference.getPreferenceState())
# clear cache after setting preferences
self.portal.portal_caches.clearAllCache()
def createDummyWitchTool(self):
if 'portal_witch' not in self.portal.objectIds():
self.portal.newContent(id='portal_witch',
portal_type=self.base_type_portal_type)
def createPerson(self, reference, password):
"""Creates person with reference and password in title to simulate remote
logging"""
self.person_module.newContent(
portal_type=self.person_portal_type,
reference=reference, title=password)
def checkLogin(self, expected, sent):
"""Helper to check login, clear cache later and commit transaction"""
self.assertEqual(expected,
self.erp5_remote_manager.authenticateCredentials(sent))
self.portal.portal_caches.clearAllCache()
############################################################################
# TESTS
############################################################################
def test_correct_login(self):
"""Checks typical login scenario"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
self.checkLogin((self.login, self.login), kw)
def test_incorrect_login(self):
"""Checks that incorrect login does not work"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': 'another_password'}
self.checkLogin(None, kw)
def test_incorrect_login_in_case_of_no_connection(self):
"""Checks that in case if there is no authentication server defined it is not possible to login"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
self.removeAuthenticationServerPreferences()
self.tic()
self.checkLogin(None, kw)
def test_loggable_in_case_of_server_socket_error(self):
"""Check that in case if socket.error is raised login works from ZODB cache"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
self.checkLogin((self.login, self.login), kw)
# patch Wizard Tool to raise in callRemoteProxyMethod
from Products.ERP5Wizard.Tool.WizardTool import WizardTool
original_callRemoteProxyMethod=WizardTool.callRemoteProxyMethod
try:
WizardTool.callRemoteProxyMethod = raises_socket_error
self.assertRaises(socket.error,
self.portal.portal_wizard.callRemoteProxyMethod)
self.checkLogin((self.login, self.login), kw)
finally:
WizardTool.callRemoteProxyMethod = original_callRemoteProxyMethod
def test_loggable_in_case_of_server_socket_sslerror(self):
"""Check that in case if socket.sslerror is raised login works from ZODB cache"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
self.checkLogin((self.login, self.login), kw)
# patch Wizard Tool to raise in callRemoteProxyMethod
from Products.ERP5Wizard.Tool.WizardTool import WizardTool
original_callRemoteProxyMethod=WizardTool.callRemoteProxyMethod
try:
WizardTool.callRemoteProxyMethod = raises_socket_sslerror
self.assertRaises(socket.sslerror,
self.portal.portal_wizard.callRemoteProxyMethod)
self.checkLogin((self.login, self.login), kw)
finally:
WizardTool.callRemoteProxyMethod = original_callRemoteProxyMethod
def test_not_loggable_in_case_of_server_raises_anything_else(self):
"""Check that in case if non socket is raised login does not works"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
self.checkLogin((self.login, self.login), kw)
# patch Wizard Tool to raise in callRemoteProxyMethod
from Products.ERP5Wizard.Tool.WizardTool import WizardTool
original_callRemoteProxyMethod=WizardTool.callRemoteProxyMethod
try:
WizardTool.callRemoteProxyMethod = raises_valueerror
self.assertRaises(ValueError,
self.portal.portal_wizard.callRemoteProxyMethod)
self.checkLogin(None, kw)
# assert that ZODB cache is emptied
self.assertFalse(self.login in \
self.erp5_remote_manager.remote_authentication_cache)
finally:
WizardTool.callRemoteProxyMethod = original_callRemoteProxyMethod
def test_loggable_in_case_of_server_socket_error_with_failed_login_between(
self):
"""Check that in case if socket.sslerror is raised login works from ZODB cache, when wrong credentials was passed"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
self.checkLogin((self.login, self.login), kw)
# patch Wizard Tool to raise in callRemoteProxyMethod
from Products.ERP5Wizard.Tool.WizardTool import WizardTool
original_callRemoteProxyMethod=WizardTool.callRemoteProxyMethod
try:
WizardTool.callRemoteProxyMethod = raises_socket_error
self.assertRaises(socket.error,
self.portal.portal_wizard.callRemoteProxyMethod)
self.checkLogin((self.login, self.login), kw)
self.checkLogin(None, {'login':kw['login'], 'password':'wrong_password'})
self.checkLogin((self.login, self.login), kw)
finally:
WizardTool.callRemoteProxyMethod = original_callRemoteProxyMethod
def test_loggable_in_case_of_server_socket_timeout(self):
"""Check that in case if socket.timeout is raised login works from ZODB cache"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
self.checkLogin((self.login, self.login), kw)
# patch Wizard Tool to raise in callRemoteProxyMethod
from Products.ERP5Wizard.Tool.WizardTool import WizardTool
original_callRemoteProxyMethod=WizardTool.callRemoteProxyMethod
try:
WizardTool.callRemoteProxyMethod = raises_socket_timeout
self.assertRaises(socket.timeout,
self.portal.portal_wizard.callRemoteProxyMethod)
self.checkLogin((self.login, self.login), kw)
finally:
WizardTool.callRemoteProxyMethod = original_callRemoteProxyMethod
def test_loggable_in_case_of_server_gaierror(self):
"""Check that in case if socket.gaierror is raised login works from ZODB cache"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
self.checkLogin((self.login, self.login), kw)
# patch Wizard Tool to raise in callRemoteProxyMethod
from Products.ERP5Wizard.Tool.WizardTool import WizardTool
original_callRemoteProxyMethod=WizardTool.callRemoteProxyMethod
try:
WizardTool.callRemoteProxyMethod = raises_socket_gaierror
self.assertRaises(socket.gaierror,
self.portal.portal_wizard.callRemoteProxyMethod)
self.checkLogin((self.login, self.login), kw)
finally:
WizardTool.callRemoteProxyMethod = original_callRemoteProxyMethod
def test_loggable_in_case_of_server_gaierror_normal_cache(self):
"""Check that in case if socket.gaierror is raised login works from usual cache"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
expected = (self.login, self.login)
sent = kw
self.assertEqual(expected,
self.erp5_remote_manager.authenticateCredentials(sent))
# patch Wizard Tool to raise in callRemoteProxyMethod
from Products.ERP5Wizard.Tool.WizardTool import WizardTool
original_callRemoteProxyMethod=WizardTool.callRemoteProxyMethod
try:
WizardTool.callRemoteProxyMethod = raises_socket_gaierror
self.assertRaises(socket.gaierror,
self.portal.portal_wizard.callRemoteProxyMethod)
self.assertEqual(expected,
self.erp5_remote_manager.authenticateCredentials(sent))
finally:
WizardTool.callRemoteProxyMethod = original_callRemoteProxyMethod
def test_loggable_in_case_of_server_raises_anythin_else_normal_cache(self):
"""Check that in case if non socket is raised login works from usual cache"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
expected = (self.login, self.login)
sent = kw
self.assertEqual(expected,
self.erp5_remote_manager.authenticateCredentials(sent))
# patch Wizard Tool to raise in callRemoteProxyMethod
from Products.ERP5Wizard.Tool.WizardTool import WizardTool
original_callRemoteProxyMethod=WizardTool.callRemoteProxyMethod
try:
WizardTool.callRemoteProxyMethod = raises_valueerror
self.assertRaises(ValueError,
self.portal.portal_wizard.callRemoteProxyMethod)
self.assertEqual(expected,
self.erp5_remote_manager.authenticateCredentials(sent))
finally:
WizardTool.callRemoteProxyMethod = original_callRemoteProxyMethod
def test_not_loggable_in_case_of_server_gaierror_no_log_before(self):
"""Check that in case if socket.gaierror is raised login does not work in case of empty ZODB cache"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
# patch Wizard Tool to raise in callRemoteProxyMethod
from Products.ERP5Wizard.Tool.WizardTool import WizardTool
original_callRemoteProxyMethod=WizardTool.callRemoteProxyMethod
try:
WizardTool.callRemoteProxyMethod = raises_socket_gaierror
self.assertRaises(socket.gaierror,
self.portal.portal_wizard.callRemoteProxyMethod)
self.checkLogin(None, kw)
finally:
WizardTool.callRemoteProxyMethod = original_callRemoteProxyMethod
def test_wrong_login_clears_zodb_cache(self):
"""Check that wrong login attempt clears ZODB cache"""
self.createPerson(self.login, self.password)
self.tic()
kw = {'login':self.login, 'password': self.password}
self.checkLogin((self.login, self.login), kw)
self.assertTrue(self.login in \
self.erp5_remote_manager.remote_authentication_cache)
self.checkLogin(None, {'login':kw['login'], 'password':'wrong_password'})
self.assertFalse(self.login in \
self.erp5_remote_manager.remote_authentication_cache)
def test_is_single_sign_on_enable(self):
""" Check if isSingleSignOn is Enabled """
self.assertTrue(self.portal.portal_wizard.isSingleSignOnEnabled())
# Make sure single_sign_on_enable was not enabled before
# start the setup was made.
self.assertFalse(self.was_sso_enable)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestERP5RemoteUserManager))
return suite
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
# Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import unittest
import xmlrpclib
from Products.ERP5Wizard.Tool.WizardTool import GeneratorCall
class TestGeneratorCall(unittest.TestCase):
"""Tests Generator Call
"""
def test_dump(self):
call = GeneratorCall()
dumped = call.dump()
self.assertTrue(isinstance(dumped, str))
load = xmlrpclib.loads(dumped)
self.assertTrue(isinstance(load, tuple))
self.assertEqual(len(load), 2)
self.assertEqual(load[1], 'GeneratorAnswer')
self.assertTrue(isinstance(load[0], tuple))
self.assertEqual(len(load[0]), 1)
server_response_dict = load[0][0]
self.assertTrue(isinstance(server_response_dict, dict))
def test_dump_load(self):
call = GeneratorCall(data='Foo')
self.assertEqual(call['data'], 'Foo')
dumped = call.dump()
self.assertTrue(isinstance(dumped, str))
# reread it in a new call
read = GeneratorCall()
read.load(dumped)
self.assertEqual(read['data'], 'Foo')
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestGeneratorCall))
return suite
......@@ -11,7 +11,7 @@ class _ERP5(ERP5TypeTestSuite):
enabled_product_list = ('CMFActivity', 'CMFCategory', 'ERP5', 'ERP5Catalog',
'ERP5Form',
'ERP5OOo', 'ERP5Security', 'ERP5SyncML', 'ERP5Type',
'ERP5Wizard', 'Formulator', 'ERP5Workflow',
'Formulator', 'ERP5Workflow',
'HBTreeFolder2', 'MailTemplates',
'PortalTransforms', 'TimerService', 'ZLDAPConnection',
'ZLDAPMethods', 'ZMySQLDA', 'ZSQLCatalog', 'Zelenium')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment