[Erp5-report] r38684 fabien - in /experimental/bt5/erp5_credential: WorkflowTemplateItem/po...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Sep 27 17:25:23 CEST 2010
Author: fabien
Date: Mon Sep 27 17:25:15 2010
New Revision: 38684
URL: http://svn.erp5.org?rev=38684&view=rev
Log:
move the credential recovery accept interaction to the credential_automatic_accept_interraction_workflow which is more appropriated for that.
Added:
experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/interactions/credential_recovery_automatic_accept.xml
experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/CredentialRecovery_preferredApprovalMethod.xml
Modified:
experimental/bt5/erp5_credential/bt/revision
experimental/bt5/erp5_credential/bt/template_portal_type_workflow_chain_list
Added: experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/interactions/credential_recovery_automatic_accept.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/interactions/credential_recovery_automatic_accept.xml?rev=38684&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/interactions/credential_recovery_automatic_accept.xml (added)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/interactions/credential_recovery_automatic_accept.xml [utf8] Mon Sep 27 17:25:15 2010
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
+ </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>
+ <list>
+ <string>CredentialRecovery_preferredApprovalMethod</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>before_commit_script_name</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string>accept() transition will be automatically called on the Credential Recovery after that the Person password been changed, without any human review. Can be configured by system preference.</string> </value>
+ </item>
+ <item>
+ <key> <string>guard</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>credential_recovery_automatic_accept</string> </value>
+ </item>
+ <item>
+ <key> <string>method_id</string> </key>
+ <value>
+ <list>
+ <string>_forceSetPassword</string>
+ </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>
+ <list>
+ <string>Person</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>script_name</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Accept Credential Automatically </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_automatic_accept_interraction_workflow/scripts/CredentialRecovery_preferredApprovalMethod.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/CredentialRecovery_preferredApprovalMethod.xml?rev=38684&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/CredentialRecovery_preferredApprovalMethod.xml (added)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/CredentialRecovery_preferredApprovalMethod.xml [utf8] Mon Sep 27 17:25:15 2010
@@ -0,0 +1,152 @@
+<?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
+When the password is changed, this mean that credential recoveries for this user works, so it\n
+should be accepted.\n
+\'\'\'\n
+portal = state_change.getPortal()\n
+person = state_change[\'object\']\n
+\n
+credential_recovery_module = portal.getDefaultModule(\'Credential Recovery\')\n
+\n
+# get all submitted credential recoveries for this user\n
+result = credential_recovery_module.searchFolder(portal_type=\'Credential Recovery\',\n
+ destination_decision_uid=person.getUid(),\n
+ validation_state=\'submitted\')\n
+\n
+# and accept them all\n
+for credential_recovery in result:\n
+ credential_recovery.getObject().accept("Automatic accept")\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/>
+ </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>_getattr_</string>
+ <string>portal</string>
+ <string>_getitem_</string>
+ <string>person</string>
+ <string>credential_recovery_module</string>
+ <string>result</string>
+ <string>_getiter_</string>
+ <string>credential_recovery</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>CredentialRecovery_preferredApprovalMethod</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>
Modified: experimental/bt5/erp5_credential/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/revision?rev=38684&r1=38683&r2=38684&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/revision [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/revision [utf8] Mon Sep 27 17:25:15 2010
@@ -1 +1 @@
-194
\ No newline at end of file
+195
\ No newline at end of file
Modified: experimental/bt5/erp5_credential/bt/template_portal_type_workflow_chain_list
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/template_portal_type_workflow_chain_list?rev=38684&r1=38683&r2=38684&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/template_portal_type_workflow_chain_list [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/template_portal_type_workflow_chain_list [utf8] Mon Sep 27 17:25:15 2010
@@ -6,5 +6,4 @@ Credential Request | credential_validati
Credential Request | edit_workflow
Credential Update | credential_interaction_workflow
Credential Update | credential_validation_workflow
-Credential Update | edit_workflow
-Person | credential_interaction_workflow
\ No newline at end of file
+Credential Update | edit_workflow
\ No newline at end of file
More information about the Erp5-report
mailing list