[Erp5-report] r38673 fabien - in /experimental/bt5/erp5_credential: WorkflowTemplateItem/po...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 27 16:25:29 CEST 2010


Author: fabien
Date: Mon Sep 27 16:25:28 2010
New Revision: 38673

URL: http://svn.erp5.org?rev=38673&view=rev
Log:
fix description, check the transition is possible

Modified:
    experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_acceptCredentialRecovery.xml
    experimental/bt5/erp5_credential/bt/revision

Modified: experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_acceptCredentialRecovery.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_acceptCredentialRecovery.xml?rev=38673&r1=38672&r2=38673&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_acceptCredentialRecovery.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_acceptCredentialRecovery.xml [utf8] Mon Sep 27 16:25:28 2010
@@ -51,11 +51,12 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>\'\'\'\n
-When the password is changed, this mean that credential recoveries for this user works, so they\n
-should be approved.\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
+isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
 \n
 credential_recovery_module = portal.getDefaultModule(\'Credential Recovery\')\n
 \n
@@ -63,7 +64,8 @@ result = credential_recovery_module.sear
                                                  destination_decision_uid=person.getUid(),\n
                                                  validation_state=\'submitted\')\n
 for credential_recovery in result:\n
-  credential_recovery.getObject().accept()\n
+  if isTransitionPossible(credential_recovery, \'accept\'):\n
+    credential_recovery.getObject().accept()\n
 </string> </value>
         </item>
         <item>
@@ -113,6 +115,7 @@ for credential_recovery in result:\n
                             <string>portal</string>
                             <string>_getitem_</string>
                             <string>person</string>
+                            <string>isTransitionPossible</string>
                             <string>credential_recovery_module</string>
                             <string>result</string>
                             <string>_getiter_</string>

Modified: experimental/bt5/erp5_credential/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/revision?rev=38673&r1=38672&r2=38673&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/revision [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/revision [utf8] Mon Sep 27 16:25:28 2010
@@ -1 +1 @@
-191
\ No newline at end of file
+192
\ No newline at end of file




More information about the Erp5-report mailing list