From 2f888e0b619b4b86c49140b813da54a0ff02fff4 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Wed, 27 Jan 2016 11:59:52 +0100
Subject: [PATCH] Revert "fix Unauthorized exception that can be caused by
 automatic solver."

Because solve() is now unrestecred method.

This reverts commit ab9e6e6984ce8f76f927e55c7d24bb3cb9224bb2.
---
 .../scripts/SolverProcess_startSolving.xml             | 10 +---------
 .../solver_workflow/scripts/SolverProcess_succeed.xml  | 10 +---------
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/solver_workflow/scripts/SolverProcess_startSolving.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/solver_workflow/scripts/SolverProcess_startSolving.xml
index 160d732e4b..9ff3efe403 100644
--- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/solver_workflow/scripts/SolverProcess_startSolving.xml
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/solver_workflow/scripts/SolverProcess_startSolving.xml
@@ -50,7 +50,7 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>solver_process = state_change[\'object\'].aq_parent\n
+            <value> <string>solver_process = state_change[\'object\'].getParentValue()\n
 if solver_process.getValidationState() == \'draft\':\n
   solver_process.startSolving()\n
 </string> </value>
@@ -59,14 +59,6 @@ if solver_process.getValidationState() == \'draft\':\n
             <key> <string>_params</string> </key>
             <value> <string>state_change, **kw</string> </value>
         </item>
-        <item>
-            <key> <string>_proxy_roles</string> </key>
-            <value>
-              <tuple>
-                <string>Auditor</string>
-              </tuple>
-            </value>
-        </item>
         <item>
             <key> <string>id</string> </key>
             <value> <string>SolverProcess_startSolving</string> </value>
diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/solver_workflow/scripts/SolverProcess_succeed.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/solver_workflow/scripts/SolverProcess_succeed.xml
index 249b298f53..2c3b78fa1e 100644
--- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/solver_workflow/scripts/SolverProcess_succeed.xml
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/solver_workflow/scripts/SolverProcess_succeed.xml
@@ -50,7 +50,7 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>solver_process = state_change[\'object\'].aq_parent\n
+            <value> <string>solver_process = state_change[\'object\'].getParentValue()\n
 for solver in solver_process.objectValues(\n
     portal_type=solver_process.getPortalObject().getPortalTargetSolverTypeList()):\n
   if solver.getValidationState() != \'solved\':\n
@@ -62,14 +62,6 @@ solver_process.succeed()\n
             <key> <string>_params</string> </key>
             <value> <string>state_change, **kw</string> </value>
         </item>
-        <item>
-            <key> <string>_proxy_roles</string> </key>
-            <value>
-              <tuple>
-                <string>Auditor</string>
-              </tuple>
-            </value>
-        </item>
         <item>
             <key> <string>id</string> </key>
             <value> <string>SolverProcess_succeed</string> </value>
-- 
2.30.9