Commit 25159621 authored by Aurel's avatar Aurel

fix transition security

on check payment, fix control when doing manual validation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19057 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 773d2125
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<item> <item>
<key> <string>guard</string> </key> <key> <string>guard</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <none/>
</value> </value>
</item> </item>
<item> <item>
...@@ -70,25 +70,4 @@ ...@@ -70,25 +70,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Assignee</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -81,7 +81,7 @@ transaction.Baobab_checkCounterDateOpen(site=source, date=date)\n ...@@ -81,7 +81,7 @@ transaction.Baobab_checkCounterDateOpen(site=source, date=date)\n
site = transaction.getSourceValue()\n site = transaction.getSourceValue()\n
\n \n
# For safety, check the consistency again.\n # For safety, check the consistency again.\n
context.validateConsistency(state_change)\n context.validateConsistency(state_change, no_balance_check=1)\n
\n \n
line = transaction.movement\n line = transaction.movement\n
bank_account = transaction.getDestinationPaymentValue()\n bank_account = transaction.getDestinationPaymentValue()\n
......
...@@ -140,6 +140,9 @@ transaction.edit(aggregate=check.getRelativeUrl())\n ...@@ -140,6 +140,9 @@ transaction.edit(aggregate=check.getRelativeUrl())\n
\n \n
context.updateBankingOperation(state_change)\n context.updateBankingOperation(state_change)\n
\n \n
if no_balance_check == 1:\n
return\n
\n
# Test if the account balance is sufficient.\n # Test if the account balance is sufficient.\n
# We do not need to serialize here because we do not make\n # We do not need to serialize here because we do not make\n
# reservation yet\n # reservation yet\n
...@@ -171,7 +174,7 @@ elif error[\'error_code\'] != 0:\n ...@@ -171,7 +174,7 @@ elif error[\'error_code\'] != 0:\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value> <value> <string>state_change, no_balance_check=0, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>_proxy_roles</string> </key> <key> <string>_proxy_roles</string> </key>
...@@ -199,13 +202,14 @@ elif error[\'error_code\'] != 0:\n ...@@ -199,13 +202,14 @@ elif error[\'error_code\'] != 0:\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>no_balance_check</string>
<string>kw</string> <string>kw</string>
<string>Products.DCWorkflow.DCWorkflow</string> <string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string> <string>ValidationFailed</string>
...@@ -242,7 +246,9 @@ elif error[\'error_code\'] != 0:\n ...@@ -242,7 +246,9 @@ elif error[\'error_code\'] != 0:\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<none/> <tuple>
<int>0</int>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -83,7 +83,7 @@ site = transaction.getSourceValue()\n ...@@ -83,7 +83,7 @@ site = transaction.getSourceValue()\n
transaction.Baobab_checkCounterOpened(site)\n transaction.Baobab_checkCounterOpened(site)\n
\n \n
# For safety, check the consistency again.\n # For safety, check the consistency again.\n
context.validateConsistency(state_change)\n context.validateConsistency(state_change, no_balance_check=1)\n
\n \n
line = transaction.movement\n line = transaction.movement\n
bank_account = transaction.getDestinationPaymentValue()\n bank_account = transaction.getDestinationPaymentValue()\n
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<item> <item>
<key> <string>guard</string> </key> <key> <string>guard</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <none/>
</value> </value>
</item> </item>
<item> <item>
...@@ -64,25 +64,4 @@ ...@@ -64,25 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Assignee</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
375 376
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment