Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/exceptions.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/exceptions.py	(revision 6198)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/exceptions.py	(revision 6199)
@@ -21,4 +21,5 @@
 ##
 import grok
+import zope.errorview.browser
 from megrok.layout import Page
 from zope.interface.common.interfaces import IException
@@ -58,17 +59,22 @@
 #        return
 
+class UnauthorizedView(grok.View, zope.errorview.browser.UnauthorizedView):
+    """Base class for rendering views for IUnauthorized exceptions.
 
-class UnauthorizedPage(WAeUPPage):
+    Backport from grok 1.6. This is only a view (not a page) because
+    we cannot trust that the associated :exc:`Unauthorized` exceptions
+    happened inside a w.s. site.
+
+    If not, then we have no layout available at time of rendering.
+
+    XXX: This view is shared for all apps and objects in the ZODB root.
+    """
     grok.context(IUnauthorized)
     grok.name('index.html')
     grok.template('unauthorized')
 
-    title = u'Unauthorized'
+    def update(self):
+        return zope.errorview.browser.UnauthorizedView.update(self)
 
-    def update(self):
-        self.error_context = self.context
-        forbidden_view = self.context.args[0]
-        self.context = forbidden_view.context
-        pass
 
 class NotFoundPage(WAeUPPage):
