[Erp5-report] r38907 fabien - in /experimental/bt5/erp5_credential: PortalTypeWorkflowChain...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Oct 6 10:12:17 CEST 2010
Author: fabien
Date: Wed Oct 6 10:12:16 2010
New Revision: 38907
URL: http://svn.erp5.org?rev=38907&view=rev
Log:
be consistent between Credential Recovery and other credential portal_types :
auto accept on submit if the preference allowed it.
Modified:
experimental/bt5/erp5_credential/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
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
experimental/bt5/erp5_credential/bt/revision
experimental/bt5/erp5_credential/bt/template_portal_type_workflow_chain_list
Modified: experimental/bt5/erp5_credential/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml?rev=38907&r1=38906&r2=38907&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml [utf8] Wed Oct 6 10:12:16 2010
@@ -1,7 +1,7 @@
<workflow_chain>
<chain>
<type>Credential Recovery</type>
- <workflow>credential_interaction_workflow, credential_validation_workflow, edit_workflow</workflow>
+ <workflow>credential_automatic_accept_interraction_workflow, credential_interaction_workflow, credential_validation_workflow, edit_workflow</workflow>
</chain>
<chain>
<type>Credential Request</type>
@@ -11,8 +11,4 @@
<type>Credential Update</type>
<workflow>credential_automatic_accept_interraction_workflow, credential_interaction_workflow, credential_validation_workflow, edit_workflow</workflow>
</chain>
- <chain>
- <type>Person</type>
- <workflow>credential_automatic_accept_interraction_workflow</workflow>
- </chain>
</workflow_chain>
\ No newline at end of file
Modified: 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=38907&r1=38906&r2=38907&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/interactions/credential_recovery_automatic_accept.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/interactions/credential_recovery_automatic_accept.xml [utf8] Wed Oct 6 10:12:16 2010
@@ -56,7 +56,7 @@
<key> <string>method_id</string> </key>
<value>
<list>
- <string>_forceSetPassword</string>
+ <string>submit</string>
</list>
</value>
</item>
@@ -68,7 +68,7 @@
<key> <string>portal_type_filter</string> </key>
<value>
<list>
- <string>Person</string>
+ <string>Credential Recovery</string>
</list>
</value>
</item>
Modified: 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=38907&r1=38906&r2=38907&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/CredentialRecovery_preferredApprovalMethod.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/CredentialRecovery_preferredApprovalMethod.xml [utf8] Wed Oct 6 10:12:16 2010
@@ -50,24 +50,15 @@
</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
+ <value> <string>"""\n
+ Decide to call or not the automatic approval for Credential Recovery\n
+"""\n
portal = state_change.getPortal()\n
\n
if portal.portal_preferences.getPreferredCredentialRecoveryAutomaticApproval():\n
- person = state_change[\'object\']\n
+ script.Credential_accept(state_change)\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
- # and accept them all\n
- for credential_recovery in result:\n
- credential_recovery.getObject().accept("Automatic accept")\n
+#else we should accept manualy\n
</string> </value>
</item>
<item>
@@ -83,9 +74,7 @@ if portal.portal_preferences.getPreferre
<item>
<key> <string>_proxy_roles</string> </key>
<value>
- <tuple>
- <string>Manager</string>
- </tuple>
+ <tuple/>
</value>
</item>
<item>
@@ -115,12 +104,7 @@ if portal.portal_preferences.getPreferre
<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>
+ <string>script</string>
</tuple>
</value>
</item>
Modified: experimental/bt5/erp5_credential/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/revision?rev=38907&r1=38906&r2=38907&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/revision [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/revision [utf8] Wed Oct 6 10:12:16 2010
@@ -1 +1 @@
-258
\ No newline at end of file
+259
\ 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=38907&r1=38906&r2=38907&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] Wed Oct 6 10:12:16 2010
@@ -1,3 +1,4 @@
+Credential Recovery | credential_automatic_accept_interraction_workflow
Credential Recovery | credential_interaction_workflow
Credential Recovery | credential_validation_workflow
Credential Recovery | edit_workflow
@@ -8,5 +9,4 @@ Credential Request | edit_workflow
Credential Update | credential_automatic_accept_interraction_workflow
Credential Update | credential_interaction_workflow
Credential Update | credential_validation_workflow
-Credential Update | edit_workflow
-Person | credential_automatic_accept_interraction_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