From 11a0254812d77df705ab913517f6376fcf14a4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 12 Sep 2008 14:30:23 +0000 Subject: [PATCH] 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 --- .../AccountModule_getBankAccountItemList.xml | 26 +------------------ ...tAccountingPeriodForDestinationSection.xml | 20 +------------- ...on_getAccountingPeriodForSourceSection.xml | 20 +------------- ...ngTransaction_getSourceSectionItemList.xml | 20 +------------- bt5/erp5_accounting/bt/revision | 2 +- 5 files changed, 5 insertions(+), 83 deletions(-) diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountItemList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountItemList.xml index c37eea9c06..c14753cc87 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountItemList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountItemList.xml @@ -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> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingPeriodForDestinationSection.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingPeriodForDestinationSection.xml index ed2f52f85c..0ca5c2999b 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingPeriodForDestinationSection.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingPeriodForDestinationSection.xml @@ -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> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingPeriodForSourceSection.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingPeriodForSourceSection.xml index 67b183907a..9e5ba6950c 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingPeriodForSourceSection.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingPeriodForSourceSection.xml @@ -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> diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getSourceSectionItemList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getSourceSectionItemList.xml index 670f800cd9..7d8fb5c572 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getSourceSectionItemList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getSourceSectionItemList.xml @@ -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> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index 988e00fe6b..c1891366fd 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -768 \ No newline at end of file +769 \ No newline at end of file -- 2.30.9