Commit 11a02548 authored by Jérome Perrin's avatar Jérome Perrin

When looking for related documents, don't check that current user can View...

When looking for related documents, don't check that current user can View them, simply check that user can acces them.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23593 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9ca6fca5
......@@ -9,22 +9,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
......@@ -79,7 +67,7 @@ if not organisation:\n
organisation_value = portal.restrictedTraverse(organisation)\n
item_list = [(\'\', \'\')]\n
for bank in LazyFilter(organisation_value.contentValues(\n
portal_type=portal.getPortalPaymentNodeTypeList()), skip=\'View\'):\n
portal_type=portal.getPortalPaymentNodeTypeList()), skip=\'\'):\n
\n
if skip_invalidated_bank_accounts and bank.getValidationState() == \'invalidated\':\n
continue\n
......@@ -107,18 +95,6 @@ return item_list\n
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>organisation=None, skip_invalidated_bank_accounts=1</string> </value>
......
......@@ -9,22 +9,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
......@@ -79,7 +67,7 @@ section = context.getDestinationSectionValue(portal_type=\'Organisation\')\n
if section is not None:\n
for accounting_period in section.contentValues(\n
portal_type=\'Accounting Period\',\n
checked_permission=\'View\'):\n
checked_permission=\'Access contents information\'):\n
if accounting_period.getSimulationState() in (\n
\'draft\', \'cancelled\', \'deleted\'):\n
continue\n
......@@ -97,12 +85,6 @@ if section is not None:\n
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
......
......@@ -9,22 +9,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
......@@ -79,7 +67,7 @@ section = context.getSourceSectionValue(portal_type=\'Organisation\')\n
if section is not None:\n
for accounting_period in section.contentValues(\n
portal_type=\'Accounting Period\',\n
checked_permission=\'View\'):\n
checked_permission=\'Access contents information\'):\n
if accounting_period.getSimulationState() in (\n
\'draft\', \'cancelled\', \'deleted\'):\n
continue\n
......@@ -97,12 +85,6 @@ if section is not None:\n
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
......
......@@ -9,22 +9,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
......@@ -78,7 +66,7 @@ if section_cat is not None:\n
\n
if section_cat_obj is not None:\n
result = section_cat_obj.getGroupRelatedValueList(portal_type=\'Organisation\',\n
checked_permission=\'View\')\n
checked_permission=\'Access contents information\')\n
result = [r for r in result\n
if r.getProperty(\'validation_state\') not in (\'invalidated\', \'deleted\')]\n
\n
......@@ -96,12 +84,6 @@ return [(\'\', \'\')] + [(i.getTitle(), i.getRelativeUrl()) for i in result]\n
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
......
768
\ No newline at end of file
769
\ 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