[Erp5-report] r22621 - in /erp5/trunk/bt5/erp5_base: SkinTemplateItem/portal_skins/erp5_bas...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jul 22 19:27:36 CEST 2008


Author: jerome
Date: Tue Jul 22 19:27:34 2008
New Revision: 22621

URL: http://svn.erp5.org?rev=22621&view=rev
Log:
Only show sections the current user can view in Base_getSectionUidListForSectionCategory.
Don't use a cache here

Modified:
    erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSectionUidListForSectionCategory.xml
    erp5/trunk/bt5/erp5_base/bt/revision

Modified: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSectionUidListForSectionCategory.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSectionUidListForSectionCategory.xml?rev=22621&r1=22620&r2=22621&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSectionUidListForSectionCategory.xml (original)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSectionUidListForSectionCategory.xml Tue Jul 22 19:27:34 2008
@@ -65,20 +65,16 @@
         </item>
         <item>
             <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
 This will only return organisation member of this section category.\n
 """\n
 portal = context.getPortalObject()\n
 \n
-def getSectionUidListForSectionCategory(section_category):\n
-  section = portal.portal_categories.restrictedTraverse(section_category)\n
-  return [x.getUid() for x in section.getGroupRelatedValueList(portal_type=\'Organisation\')]\n
-\n
-from Products.ERP5Type.Cache import CachingMethod\n
-getCurrencyForSection = CachingMethod(getSectionUidListForSectionCategory,\n
-                                      id=script.getId())\n
-return getSectionUidListForSectionCategory(section_category)\n
+section = portal.portal_categories.restrictedTraverse(section_category)\n
+return [x.getUid() for x in\n
+            section.getGroupRelatedValueList(portal_type=\'Organisation\',\n
+                                             checked_permission=\'View\')]\n
 </string> </value>
         </item>
         <item>
@@ -131,11 +127,11 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
-                            <string>getSectionUidListForSectionCategory</string>
-                            <string>Products.ERP5Type.Cache</string>
-                            <string>CachingMethod</string>
-                            <string>script</string>
-                            <string>getCurrencyForSection</string>
+                            <string>section</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>_getiter_</string>
+                            <string>x</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_base/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/revision?rev=22621&r1=22620&r2=22621&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/revision (original)
+++ erp5/trunk/bt5/erp5_base/bt/revision Tue Jul 22 19:27:34 2008
@@ -1,1 +1,1 @@
-373
+374




More information about the Erp5-report mailing list