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,10 +98,13 @@ class WebSite(Domain): ...@@ -98,10 +98,13 @@ class WebSite(Domain):
portal = self.getPortalObject() portal = self.getPortalObject()
# Use the webmaster identity to find documents # Use the webmaster identity to find documents
user = portal.acl_users.getUserById(self.getWebmaster()) user = portal.acl_users.getUserById(self.getWebmaster())
if user is not None:
newSecurityManager(get_request(), user) newSecurityManager(get_request(), user)
document = self.WebSite_getDocument(portal, name) document = self.WebSite_getDocument(portal, name)
self._v_allow_lookup[name] = document self._v_allow_lookup[name] = document
setSecurityManager(old_manager) setSecurityManager(old_manager)
else:
document = None
except: except:
# Cleanup non recursion dict in case of exception # Cleanup non recursion dict in case of exception
if self._v_allow_lookup.has_key(name): del self._v_allow_lookup[name] if self._v_allow_lookup.has_key(name): del self._v_allow_lookup[name]
......
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