Commit 884bb461 authored by Sebastien Robin's avatar Sebastien Robin

erp5_base: avoid Unauthorized errors when editing person details with cancelled career steps

Base_checkPermission script API is not so nice. With it's name, we would expect it
doing checking on the object on which it is called. Instead we must give a path. This
would need to be improved. Also we will ned to clean proxification
parent def37b53
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
<item> <item>
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list/> <list>
<string>editable</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -50,6 +52,12 @@ ...@@ -50,6 +52,12 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>editable</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -69,6 +77,10 @@ ...@@ -69,6 +77,10 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_start_date</string> </value> <value> <string>my_start_date</string> </value>
...@@ -87,4 +99,17 @@ ...@@ -87,4 +99,17 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.Base_checkPermission(cell.getRelativeUrl(), "Modify portal content")</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
<item> <item>
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list/> <list>
<string>editable</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -50,6 +52,12 @@ ...@@ -50,6 +52,12 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>editable</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -69,6 +77,10 @@ ...@@ -69,6 +77,10 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_stop_date</string> </value> <value> <string>my_stop_date</string> </value>
...@@ -87,4 +99,17 @@ ...@@ -87,4 +99,17 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.Base_checkPermission(cell.getRelativeUrl(), "Modify portal content")</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
<item> <item>
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list/> <list>
<string>editable</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -56,6 +58,12 @@ ...@@ -56,6 +58,12 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>editable</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -75,6 +83,10 @@ ...@@ -75,6 +83,10 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_title</string> </value> <value> <string>my_title</string> </value>
...@@ -124,37 +136,37 @@ ...@@ -124,37 +136,37 @@
<item> <item>
<key> <string>ampm</string> </key> <key> <string>ampm</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>day</string> </key> <key> <string>day</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>hour</string> </key> <key> <string>hour</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>minute</string> </key> <key> <string>minute</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>month</string> </key> <key> <string>month</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>year</string> </key> <key> <string>year</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAk=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -227,6 +239,19 @@ ...@@ -227,6 +239,19 @@
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.Base_checkPermission(cell.getRelativeUrl(), "Modify portal content")</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
...@@ -489,7 +514,7 @@ ...@@ -489,7 +514,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="5" aka="AAAAAAAAAAU=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
...@@ -744,7 +769,7 @@ ...@@ -744,7 +769,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="5" aka="AAAAAAAAAAU="> <record id="6" aka="AAAAAAAAAAY=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
...@@ -999,7 +1024,7 @@ ...@@ -999,7 +1024,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="6" aka="AAAAAAAAAAY="> <record id="7" aka="AAAAAAAAAAc=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
...@@ -1254,7 +1279,7 @@ ...@@ -1254,7 +1279,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="7" aka="AAAAAAAAAAc="> <record id="8" aka="AAAAAAAAAAg=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
...@@ -1509,7 +1534,7 @@ ...@@ -1509,7 +1534,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="8" aka="AAAAAAAAAAg="> <record id="9" aka="AAAAAAAAAAk=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
......
1059 1060
\ 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