From 817c457f4346e6361bbfdaf7fbb162eef2e4fe23 Mon Sep 17 00:00:00 2001
From: Gabriel Monnerat <gabriel@tiolive.com>
Date: Wed, 20 Aug 2014 15:00:43 +0200
Subject: [PATCH] Added a security policy which is able to combine parent (for
 group and function) plus strict base category. It can be useful to generate
 groups as function* + group* + site, for example.

---
 .../portal_components/extension.erp5.StandardSecurity.py    | 6 +++++-
 product/ERP5/bootstrap/erp5_core/bt/revision                | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.StandardSecurity.py b/product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.StandardSecurity.py
index c74c4a837f..fb17da7726 100644
--- a/product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.StandardSecurity.py
+++ b/product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.StandardSecurity.py
@@ -84,7 +84,7 @@ def getSecurityCategoryFromAssignment(self, base_category_list, user_name, objec
             else:
               category_dict.setdefault(base_category, []).append(category_value.getRelativeUrl())
       category_list.append(category_dict)
-  
+
   return category_list
 
 
@@ -103,3 +103,7 @@ def getSecurityCategoryFromAssignmentParentFunction(self, base_category_list,
   return getSecurityCategoryFromAssignment(self, base_category_list,
                                        user_name, object, portal_type, child_category_list=('function',))
 
+def getSecurityCategoryFromAssignmentParentFunctionParentGroup(self, base_category_list,
+                                       user_name, object, portal_type):
+  return getSecurityCategoryFromAssignment(self, base_category_list,
+                                       user_name, object, portal_type, child_category_list=('function', 'group'))
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index 2ff094fcb2..32cf3342e4 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-41170
\ No newline at end of file
+41171
\ No newline at end of file
-- 
2.30.9