[Erp5-report] r39266 rafael - in /erp5/trunk/bt5/erp5_wizard: SkinTemplateItem/portal_skins...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 15 23:34:48 CEST 2010


Author: rafael
Date: Fri Oct 15 23:34:45 2010
New Revision: 39266

URL: http://svn.erp5.org?rev=39266&view=rev
Log:
Added scripts to manage remote Authentification person and assigments.

Added:
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_createNewGlobalUserAccount.xml
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_getDataDict.xml
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_invalidateGlobalUserAccount.xml
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserAction.xml
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog/
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog.xml
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog/your_reference.xml
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_synchroniseExistingAccountWithInstance.xml
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_validateGlobalUserAccount.xml
Modified:
    erp5/trunk/bt5/erp5_wizard/bt/revision

Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_createNewGlobalUserAccount.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_createNewGlobalUserAccount.xml?rev=39266&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_createNewGlobalUserAccount.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_createNewGlobalUserAccount.xml [utf8] Fri Oct 15 23:34:45 2010
@@ -0,0 +1,158 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>portal = context.getPortalObject()\n
+\n
+if person is None:\n
+  person = context\n
+kw = person.Person_getDataDict()\n
+kw[\'password\'] = password\n
+\n
+# explicitly check if username is unique\n
+if portal.Base_validatePersonReference(kw[\'reference\'], context.REQUEST):\n
+  # create user in Authentification Server\n
+  portal.portal_wizard.callRemoteProxyMethod(\n
+                         \'WitchTool_createNewGlobalUserAccountFromExpressInstance\', \\\n
+                         use_cache = 0, \\\n
+                         ignore_exceptions = 0, \\\n
+                         **kw)\n
+else:\n
+  # user reference is NOT unique (valid) in Nexedi ERP5\n
+  raise ValueError, "User reference not unique"\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>password=None, person=None, **kw</string> </value>
+        </item>
+        <item>
+            <key> <string>_proxy_roles</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>password</string>
+                            <string>person</string>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>portal</string>
+                            <string>None</string>
+                            <string>_write_</string>
+                            <string>_getitem_</string>
+                            <string>_apply_</string>
+                            <string>ValueError</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+                <none/>
+              </tuple>
+            </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>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_getDataDict.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_getDataDict.xml?rev=39266&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_getDataDict.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_getDataDict.xml [utf8] Fri Oct 15 23:34:45 2010
@@ -0,0 +1,142 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>if person is None:\n
+  person = context\n
+\n
+kw = {\'reference\': person.getReference(),\n
+      \'validation_state\': person.getValidationState(),\n
+      \'erp5_uid\': context.ERP5Site_getExpressInstanceUid()}\n
+return kw\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </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>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>person</string>
+                            <string>None</string>
+                            <string>context</string>
+                            <string>_getattr_</string>
+                            <string>kw</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </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>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_invalidateGlobalUserAccount.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_invalidateGlobalUserAccount.xml?rev=39266&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_invalidateGlobalUserAccount.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_invalidateGlobalUserAccount.xml [utf8] Fri Oct 15 23:34:45 2010
@@ -0,0 +1,155 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>"""\n
+ Invalidate global user account. \n
+\n
+ Only invalidate if the local user has no Valid Assigments and \n
+ reference.\n
+"""\n
+if person is None:\n
+  person = context\n
+\n
+reference = person.getReference()\n
+if reference is not None and \\\n
+  len(person.Person_getAvailableAssignmentValueList()) == 0:\n
+  # invalidate user in Authentification Server only if its a loggable user in current instance\n
+  kw = person.Person_getDataDict()\n
+  context.portal_wizard.callRemoteProxyMethod(\n
+                     \'WitchTool_invalidateGlobalUserAccountFromExpressInstance\', \\\n
+                     use_cache = 0, \\\n
+                     ignore_exceptions = 0, \\\n
+                     **kw)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>person=None, **kw</string> </value>
+        </item>
+        <item>
+            <key> <string>_proxy_roles</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>person</string>
+                            <string>kw</string>
+                            <string>None</string>
+                            <string>context</string>
+                            <string>_getattr_</string>
+                            <string>reference</string>
+                            <string>len</string>
+                            <string>_apply_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </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>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserAction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserAction.xml?rev=39266&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserAction.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserAction.xml [utf8] Fri Oct 15 23:34:45 2010
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>translateString = context.Base_translateString\n
+if context.getReference():\n
+  portal_status_message = translateString(\'User has login already.\')\n
+elif not context.WizardTool_isPersonReferencePresent(reference):\n
+  portal_status_message = translateString(\'User does not exist yet.\')\n
+else:\n
+  # create a local copy\n
+  context.edit(reference = reference)\n
+  # create a global account\n
+  context.Person_synchroniseExistingAccountWithInstance()\n
+  portal_status_message = translateString(\'Status changed.\')\n
+\n
+# redirect appropriately\n
+context.Base_redirect(form_id=form_id,\n
+                      keep_items={\'portal_status_message\':portal_status_message})\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>reference, form_id = \'view\'</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>reference</string>
+                            <string>form_id</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>translateString</string>
+                            <string>portal_status_message</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <string>view</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Person_reuseExistingUserAction</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog.xml?rev=39266&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog.xml [utf8] Fri Oct 15 23:34:45 2010
@@ -0,0 +1,152 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ERP5Form" module="Products.ERP5Form.Form"/>
+    </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>
+                      </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>

Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog/your_reference.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog/your_reference.xml?rev=39266&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog/your_reference.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_reuseExistingUserDialog/your_reference.xml [utf8] Fri Oct 15 23:34:45 2010
@@ -0,0 +1,101 @@
+<?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>

Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_synchroniseExistingAccountWithInstance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_synchroniseExistingAccountWithInstance.xml?rev=39266&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_synchroniseExistingAccountWithInstance.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_synchroniseExistingAccountWithInstance.xml [utf8] Fri Oct 15 23:34:45 2010
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>portal = context.getPortalObject()\n
+\n
+if person is None:\n
+  person = context\n
+\n
+kw = person.Person_getDataDict()\n
+\n
+# explicitly check if username is unique\n
+if portal.WizardTool_isPersonReferencePresent(kw[\'reference\']):\n
+  # create assignment for user in Authentification Server\n
+  portal.portal_wizard.callRemoteProxyMethod(\n
+                         \'WitchTool_createNewAssignmentForExistingPerson\',\n
+                         use_cache = 0,\n
+                         ignore_exceptions = 0,\n
+                         **kw)\n
+else:\n
+  raise ValueError, "User does not exist yet"\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>person=None, **kw</string> </value>
+        </item>
+        <item>
+            <key> <string>_proxy_roles</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>person</string>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>portal</string>
+                            <string>None</string>
+                            <string>_getitem_</string>
+                            <string>_apply_</string>
+                            <string>ValueError</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </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>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_validateGlobalUserAccount.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_validateGlobalUserAccount.xml?rev=39266&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_validateGlobalUserAccount.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Person_validateGlobalUserAccount.xml [utf8] Fri Oct 15 23:34:45 2010
@@ -0,0 +1,160 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+"""\n
+ Validate persons on remote master server. \n
+\n
+ Only validate remote person/assigments if person \n
+ has reference and valid assigments. \n
+"""\n
+\n
+if person is None:\n
+  person = context\n
+\n
+reference = person.getReference()\n
+if reference is not None and \\\n
+  len(person.Person_getAvailableAssignmentValueList()) > 0:\n
+  # validate user in Nexedi ERP5 only if its a loggable user in current instance\n
+  kw = person.Person_getDataDict()\n
+  context.portal_wizard.callRemoteProxyMethod(\n
+                       \'WitchTool_validateGlobalUserAccountFromExpressInstance\', \\\n
+                       use_cache = 0, \\\n
+                       ignore_exceptions = 0, \\\n
+                       **kw)\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>person=None, **kw</string> </value>
+        </item>
+        <item>
+            <key> <string>_proxy_roles</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>person</string>
+                            <string>kw</string>
+                            <string>None</string>
+                            <string>context</string>
+                            <string>_getattr_</string>
+                            <string>reference</string>
+                            <string>len</string>
+                            <string>_apply_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </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>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_wizard/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/bt/revision?rev=39266&r1=39265&r2=39266&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_wizard/bt/revision [utf8] Fri Oct 15 23:34:45 2010
@@ -1 +1 @@
-154
\ No newline at end of file
+155
\ No newline at end of file




More information about the Erp5-report mailing list