[Erp5-report] r36798 fabien - in /experimental/bt5/erp5_credential: SkinTemplateItem/portal...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jul 2 11:55:10 CEST 2010
Author: fabien
Date: Fri Jul 2 11:55:03 2010
New Revision: 36798
URL: http://svn.erp5.org?rev=36798&view=rev
Log:
set password only if something as been entered.
Add new interaction to set automatically the credential_update properties when the destination_source is set. This is usefull in case a manager want to create a credential update for somebody else.
Added:
experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_update_set_properties.xml
experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_updateSetPropertiesFromDestinationDecision.xml
Modified:
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialUpdate.xml
experimental/bt5/erp5_credential/bt/revision
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialUpdate.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialUpdate.xml?rev=36798&r1=36797&r2=36798&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialUpdate.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newCredentialUpdate.xml [utf8] Fri Jul 2 11:55:03 2010
@@ -62,14 +62,14 @@ if person is None:\n
module = context.getDefaultModule(portal_type=\'Credential Update\')\n
credential_update = module.newContent(\n
\t\tportal_type="Credential Update")\n
-\n
credential_update.edit(first_name=first_name,\n
last_name=last_name,\n
- password=password,\n
default_credential_question_question=default_credential_question_question,\n
default_credential_question_question_free_text=default_credential_question_question_free_text,\n
default_credential_question_answer=default_credential_question_answer,\n
default_email_text=default_email_text)\n
+if password:\n
+ credential_update.edit(password=password)\n
\n
credential_update.setDestinationDecisionValue(person)\n
credential_update.submit()\n
Added: experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_update_set_properties.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_update_set_properties.xml?rev=36798&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_update_set_properties.xml (added)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_update_set_properties.xml [utf8] Fri Jul 2 11:55:03 2010
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
+ <tuple/>
+ </tuple>
+ </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>
+ <tuple/>
+ </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>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>credential_update_set_properties</string> </value>
+ </item>
+ <item>
+ <key> <string>method_id</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>once_per_transaction</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>portal_type_filter</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>script_name</string> </key>
+ <value>
+ <tuple/>
+ </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>
+</ZopeData>
Added: experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_updateSetPropertiesFromDestinationDecision.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_updateSetPropertiesFromDestinationDecision.xml?rev=36798&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_updateSetPropertiesFromDestinationDecision.xml (added)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_updateSetPropertiesFromDestinationDecision.xml [utf8] Fri Jul 2 11:55:03 2010
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </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>credential_update = state_change[\'object\']\n
+related_person = credential_update.getDestinationDecisionValue()\n
+\n
+person_kw = { \'first_name\':related_person.getFirstName(),\n
+ \'last_name\':related_person.getLastName(),\n
+ \'email_text\':related_person.getEmailText(),\n
+ \'default_credential_question_answer\':related_person.getDefaultCredentialQuestionAnswer(),\n
+ \'default_credential_question_question_free_text\':related_person.getDefaultCredentialQuestionQuestionFreeText(),\n
+ \'default_credential_question_question\':related_person.getDefaultCredentialQuestionQuestion(),\n
+ }\n
+credential_update.edit(**person_kw)\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </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>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>state_change</string>
+ <string>_getitem_</string>
+ <string>credential_update</string>
+ <string>_getattr_</string>
+ <string>related_person</string>
+ <string>person_kw</string>
+ <string>_apply_</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>Credential_updateSetPropertiesFromDestinationDecision</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>This script use Proxy Role(Manager)</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: experimental/bt5/erp5_credential/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/revision?rev=36798&r1=36797&r2=36798&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/revision [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/revision [utf8] Fri Jul 2 11:55:03 2010
@@ -1 +1 @@
-106
\ No newline at end of file
+107
\ No newline at end of file
More information about the Erp5-report
mailing list