From 62a0e9d26d5b4c5f4d7567f12d7b6c2c400cebc7 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Thu, 17 Jan 2008 13:08:23 +0000 Subject: [PATCH] Add the possibility to acquire security from parent. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18769 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_base/ERP5Type_acquireSecurityFromCategory.xml | 7 ++++++- bt5/erp5_base/bt/revision | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Type_acquireSecurityFromCategory.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Type_acquireSecurityFromCategory.xml index d66accf785..42cca7255a 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Type_acquireSecurityFromCategory.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Type_acquireSecurityFromCategory.xml @@ -79,7 +79,11 @@ if object is None:\n return []\n \n for base_category in base_category_list:\n - for o in object.getValueList(base_category):\n + if base_category == \'parent\':\n + o_list = [object.getParentValue()]\n + else:\n + o_list = object.getValueList(base_category)\n + for o in o_list:\n for user, role_list in o.get_local_roles():\n for role in role_list:\n category_dict.setdefault(role, []).append(user)\n @@ -153,6 +157,7 @@ return category_dict\n <string>_getiter_</string> <string>base_category</string> <string>_getattr_</string> + <string>o_list</string> <string>o</string> <string>user</string> <string>role_list</string> diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index 4acc65d012..d36f9fbea4 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -266 \ No newline at end of file +267 \ No newline at end of file -- 2.30.9