Commit 9a808df9 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix error when creating a website : there is no default webmaster. (but I'm also working on it.)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5659 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eb75efc1
......@@ -98,12 +98,15 @@ class WebSite(Domain):
portal = self.getPortalObject()
# Use the webmaster identity to find documents
user = portal.acl_users.getUserById(self.getWebmaster())
newSecurityManager(get_request(), user)
document = self.WebSite_getDocument(portal, name)
self._v_allow_lookup[name] = document
setSecurityManager(old_manager)
if user is not None:
newSecurityManager(get_request(), user)
document = self.WebSite_getDocument(portal, name)
self._v_allow_lookup[name] = document
setSecurityManager(old_manager)
else:
document = None
except:
# Cleanup non recursion dict in case of exception
if self._v_allow_lookup.has_key(name): del self._v_allow_lookup[name]
raise
return document
\ No newline at end of file
return document
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment