From 78318ce80758ce867ab8ab723a3caf9619dcf884 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 23 Oct 2007 12:11:51 +0000
Subject: [PATCH] There was a mistake in r15747, the owner was not taken into
 account when called from an "executable" (restricted python) without proxy
 role.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17118 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Catalog/CatalogTool.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Catalog/CatalogTool.py b/product/ERP5Catalog/CatalogTool.py
index 0073a87f9a..01ed7e4a13 100644
--- a/product/ERP5Catalog/CatalogTool.py
+++ b/product/ERP5Catalog/CatalogTool.py
@@ -492,7 +492,9 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
               # if called by an executable with proxy roles, we don't use
               # owner, but only roles from the proxy.
               eo = getSecurityManager()._context.stack[-1]
-              proxy_roles = getattr(eo, '_proxy_roles',None)
+              proxy_roles = getattr(eo, '_proxy_roles', None)
+              if not proxy_roles:
+                role_column_dict['owner'] = user_str
             except IndexError:
               role_column_dict['owner'] = user_str
 
-- 
2.30.9