Commit a46b931a authored by Jérome Perrin's avatar Jérome Perrin

Only show sections the current user can view in Base_getSectionUidListForSectionCategory.

Don't use a cache here

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22621 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 06a56692
...@@ -65,20 +65,16 @@ ...@@ -65,20 +65,16 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""Returns the list of section_uid for a section_category.\n <value> <string>"""Returns the list of section_uid for a group section_category.\n
\n \n
This will only return organisation member of this section category.\n This will only return organisation member of this section category.\n
"""\n """\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
\n \n
def getSectionUidListForSectionCategory(section_category):\n section = portal.portal_categories.restrictedTraverse(section_category)\n
section = portal.portal_categories.restrictedTraverse(section_category)\n return [x.getUid() for x in\n
return [x.getUid() for x in section.getGroupRelatedValueList(portal_type=\'Organisation\')]\n section.getGroupRelatedValueList(portal_type=\'Organisation\',\n
\n checked_permission=\'View\')]\n
from Products.ERP5Type.Cache import CachingMethod\n
getCurrencyForSection = CachingMethod(getSectionUidListForSectionCategory,\n
id=script.getId())\n
return getSectionUidListForSectionCategory(section_category)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -131,11 +127,11 @@ return getSectionUidListForSectionCategory(section_category)\n ...@@ -131,11 +127,11 @@ return getSectionUidListForSectionCategory(section_category)\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
<string>getSectionUidListForSectionCategory</string> <string>section</string>
<string>Products.ERP5Type.Cache</string> <string>append</string>
<string>CachingMethod</string> <string>$append0</string>
<string>script</string> <string>_getiter_</string>
<string>getCurrencyForSection</string> <string>x</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
373 374
\ 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