From 011c2fc72249d6fda9211fcbbdf80d81a37f13f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 26 Mar 2010 13:38:49 +0000
Subject: [PATCH] support strict section membership

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34151 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../Base_getSectionUidListForSectionCategory.xml   | 14 ++++++++++----
 bt5/erp5_base/bt/revision                          |  2 +-
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSectionUidListForSectionCategory.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSectionUidListForSectionCategory.xml
index 955f786b42..348fe1ca70 100644
--- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSectionUidListForSectionCategory.xml
+++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSectionUidListForSectionCategory.xml
@@ -55,13 +55,16 @@
             <key> <string>_body</string> </key>
             <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
+This will only return organisations member of this section category.\n
+If \'strict_membership\' is true, then only organisations strictly member\n
+of the category will be returned.\n
 """\n
 portal = context.getPortalObject()\n
 \n
 section = portal.portal_categories.restrictedTraverse(section_category)\n
 return [x.getUid() for x in\n
             section.getGroupRelatedValueList(portal_type=\'Organisation\',\n
+                                             strict_membership=strict_membership,\n
                                              checked_permission=\'View\')]\n
 </string> </value>
         </item>
@@ -73,7 +76,7 @@ return [x.getUid() for x in\n
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>section_category</string> </value>
+            <value> <string>section_category, strict_membership=False</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -93,13 +96,14 @@ return [x.getUid() for x in\n
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>1</int> </value>
+                        <value> <int>2</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
                             <string>section_category</string>
+                            <string>strict_membership</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
@@ -119,7 +123,9 @@ return [x.getUid() for x in\n
         <item>
             <key> <string>func_defaults</string> </key>
             <value>
-              <none/>
+              <tuple>
+                <int>0</int>
+              </tuple>
             </value>
         </item>
         <item>
diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision
index e8f7ef6cfa..2764f7b002 100644
--- a/bt5/erp5_base/bt/revision
+++ b/bt5/erp5_base/bt/revision
@@ -1 +1 @@
-707
\ No newline at end of file
+708
\ No newline at end of file
-- 
2.30.9