Commit fa277097 authored by Ivan Tyagov's avatar Ivan Tyagov

Use erp5_credential systems to manage users' registration & password reset or retrieval.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40773 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e9afcf4d
<?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>
erp5_credential
erp5_knowledge_pad
erp5_dms
erp5_web
\ No newline at end of file
1700
\ No newline at end of file
1701
\ No newline at end of file
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