[Erp5-report] r40773 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:15:57 CET 2010
Author: ivan
Date: Fri Nov 26 13:15:57 2010
New Revision: 40773
URL: http://svn.erp5.org?rev=40773&view=rev
Log:
Use erp5_credential systems to manage users' registration & password reset or retrieval.
Added:
erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/WebSite_createWebSiteAccount.xml
Modified:
erp5/trunk/bt5/erp5_km/bt/dependency_list
erp5/trunk/bt5/erp5_km/bt/revision
Added: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/WebSite_createWebSiteAccount.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/WebSite_createWebSiteAccount.xml?rev=40773&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/WebSite_createWebSiteAccount.xml (added)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/WebSite_createWebSiteAccount.xml [utf8] Fri Nov 26 13:15:57 2010
@@ -0,0 +1,175 @@
+<?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
+ Create basic KM account using ERP5 credentials system.\n
+"""\n
+from Products.Formulator.Errors import ValidationError, FormValidationError\n
+portal = context.getPortalObject()\n
+translateString = context.Base_translateString\n
+website = context.getWebSiteValue()\n
+\n
+# Call Base_edit\n
+result, result_type = context.Base_edit(form_id, silent_mode=1, field_prefix=\'your_\')\n
+\n
+# Return if not appropriate\n
+if result_type != \'edit\':\n
+ return result\n
+kw, encapsulated_editor_list = result\n
+\n
+# XXX: hard coded due to erp5_credentials requirement\n
+kw[\'role_list\'] = [\'internal\']\n
+kw.pop(\'password_confirm\', None)\n
+default_email_text = reference = kw.pop(\'default_email_text\')\n
+context.ERP5Site_newCredentialRequest(reference=reference, \\\n
+ default_email_text=default_email_text, **kw)\n
+\n
+msg = translateString("Your account was successfully created. You will be notified by email how to proceed.")\n
+return website.Base_redirect(form_id, keep_items=dict(portal_status_message=msg,\n
+ editable_mode=0))\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>form_id</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>form_id</string>
+ <string>Products.Formulator.Errors</string>
+ <string>ValidationError</string>
+ <string>FormValidationError</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>portal</string>
+ <string>translateString</string>
+ <string>website</string>
+ <string>_getiter_</string>
+ <string>result</string>
+ <string>result_type</string>
+ <string>kw</string>
+ <string>encapsulated_editor_list</string>
+ <string>_write_</string>
+ <string>None</string>
+ <string>default_email_text</string>
+ <string>reference</string>
+ <string>_apply_</string>
+ <string>msg</string>
+ <string>dict</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>WebSite_createWebSiteAccount</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Create Web Site User Account</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_km/bt/dependency_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/bt/dependency_list?rev=40773&r1=40772&r2=40773&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/bt/dependency_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/bt/dependency_list [utf8] Fri Nov 26 13:15:57 2010
@@ -1,3 +1,4 @@
+erp5_credential
erp5_knowledge_pad
erp5_dms
erp5_web
\ No newline at end of file
Modified: erp5/trunk/bt5/erp5_km/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/bt/revision?rev=40773&r1=40772&r2=40773&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/bt/revision [utf8] Fri Nov 26 13:15:57 2010
@@ -1 +1 @@
-1700
\ No newline at end of file
+1701
\ No newline at end of file
More information about the Erp5-report
mailing list