From 7956d3e2482dd876c7576e74e7a88f790421d453 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Fri, 19 Jan 2007 14:05:44 +0000
Subject: [PATCH] Added warning in case webmaster is not defined

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12158 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/WebSection.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Document/WebSection.py b/product/ERP5/Document/WebSection.py
index 4b0616a558..302bee95d6 100644
--- a/product/ERP5/Document/WebSection.py
+++ b/product/ERP5/Document/WebSection.py
@@ -36,7 +36,7 @@ from Acquisition import ImplicitAcquisitionWrapper, aq_base, aq_inner
 from Products.ERP5Type.Base import TempBase
 from Globals import get_request
 
-from zLOG import LOG
+from zLOG import LOG, WARNING
 
 from Products.ERP5Type.Cache import getReadOnlyTransactionCache
 
@@ -176,7 +176,10 @@ class WebSection(Domain):
         if user is not None:
           old_manager = getSecurityManager()
           newSecurityManager(get_request(), user)
-        LOG('Lookup', 0, str(name))
+        else:
+          LOG('WebSection _aq_dynamic', WARNING, 'No user defined for %s.'
+          'This will prevent accessing object through their permanent URL' % self.getWebmaster())
+        #LOG('Lookup', 0, str(name))
         document = self.getDocumentValue(name=name, portal=portal)
         request[CACHE_KEY][name] = document
         if user is not None:
-- 
2.30.9