[Erp5-report] r40777 ivan - in /erp5/trunk/bt5/erp5_km: SkinTemplateItem/portal_skins/erp5_...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Nov 26 13:40:47 CET 2010
Author: ivan
Date: Fri Nov 26 13:40:46 2010
New Revision: 40777
URL: http://svn.erp5.org?rev=40777&view=rev
Log:
Make sure email (or actually reference in KM context) uniqueness check happens at registration form level.
Added:
erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isReferenceUnique.xml
Modified:
erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/login_form/your_default_email_text.xml
erp5/trunk/bt5/erp5_km/bt/revision
Added: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isReferenceUnique.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isReferenceUnique.xml?rev=40777&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isReferenceUnique.xml (added)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isReferenceUnique.xml [utf8] Fri Nov 26 13:40:46 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>"""\n
+ External validator for login_form\n
+ that checks that reference is unique into the system.\n
+"""\n
+kw={\'reference\': editor,\n
+ \'portal_type\': [\'Person\', \'Credential Request\']}\n
+email = context.portal_catalog.getResultValue(**kw)\n
+if email is not None:\n
+ return 0\n
+return 1\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>editor, request</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>2</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>editor</string>
+ <string>request</string>
+ <string>kw</string>
+ <string>_apply_</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>email</string>
+ <string>None</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>Base_isReferenceUnique</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/login_form/your_default_email_text.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/login_form/your_default_email_text.xml?rev=40777&r1=40776&r2=40777&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/login_form/your_default_email_text.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/login_form/your_default_email_text.xml [utf8] Fri Nov 26 13:40:46 2010
@@ -11,6 +11,15 @@
<value>
<list>
<string>enabled</string>
+ <string>external_validator</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>delegated_message_list</string> </key>
+ <value>
+ <list>
+ <string>external_validator_failed</string>
</list>
</value>
</item>
@@ -24,7 +33,7 @@
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
- <value> <string>The input failed the external validator.</string> </value>
+ <value> <string>Email is already used into the system. Please try new one.</string> </value>
</item>
</dictionary>
</value>
@@ -82,6 +91,12 @@
<value> <int>1</int> </value>
</item>
<item>
+ <key> <string>external_validator</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+ </value>
+ </item>
+ <item>
<key> <string>field_id</string> </key>
<value> <string>your_default_email_text</string> </value>
</item>
@@ -112,4 +127,17 @@
</dictionary>
</pickle>
</record>
+ <record id="3" aka="AAAAAAAAAAM=">
+ <pickle>
+ <global name="Method" module="Products.Formulator.MethodField"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>method_name</string> </key>
+ <value> <string>Base_isReferenceUnique</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
</ZopeData>
Modified: erp5/trunk/bt5/erp5_km/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/bt/revision?rev=40777&r1=40776&r2=40777&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/bt/revision [utf8] Fri Nov 26 13:40:46 2010
@@ -1 +1 @@
-1701
\ No newline at end of file
+1703
\ No newline at end of file
More information about the Erp5-report
mailing list