From b9d34601036fb79d875a0bb8541eca295907b9a2 Mon Sep 17 00:00:00 2001 From: Fabien Morin <fabien@nexedi.com> Date: Fri, 12 Sep 2008 12:24:20 +0000 Subject: [PATCH] use a custom variable 'anonymous_module' to know wich module the annonymous application belongs to git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23586 20353a03-c40f-0410-a6d1-a30d3c3de9de --- bt5/erp5_egov/ExtensionTemplateItem/StandardSecurity.py | 5 ++--- bt5/erp5_egov/bt/revision | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bt5/erp5_egov/ExtensionTemplateItem/StandardSecurity.py b/bt5/erp5_egov/ExtensionTemplateItem/StandardSecurity.py index 0bf10d42ab..673d0a83df 100644 --- a/bt5/erp5_egov/ExtensionTemplateItem/StandardSecurity.py +++ b/bt5/erp5_egov/ExtensionTemplateItem/StandardSecurity.py @@ -132,9 +132,8 @@ def getSecurityCategoryFromEntity(self, base_category_list, entity_name, # XXX this hack permit to get the module of the application # the goal is to work with anonymous applications, even if they are # not reindexed - if len(self.REQUEST.steps) >= 3 and \ - 'module' in self.REQUEST.steps[-3]: - module_id = self.REQUEST.steps[-3] + module_id = self.REQUEST.get('anonymous_module', None) + if module_id: module = getattr(portal, module_id, None) if module is not None: result = module._getOb(entity_name, None) diff --git a/bt5/erp5_egov/bt/revision b/bt5/erp5_egov/bt/revision index e6d11f621d..6eac4a65cd 100644 --- a/bt5/erp5_egov/bt/revision +++ b/bt5/erp5_egov/bt/revision @@ -1 +1 @@ -291 \ No newline at end of file +292 \ No newline at end of file -- 2.30.9