- Timestamp:
- 26 May 2011, 21:59:52 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/exceptions.py
r6192 r6199 21 21 ## 22 22 import grok 23 import zope.errorview.browser 23 24 from megrok.layout import Page 24 25 from zope.interface.common.interfaces import IException … … 58 59 # return 59 60 61 class UnauthorizedView(grok.View, zope.errorview.browser.UnauthorizedView): 62 """Base class for rendering views for IUnauthorized exceptions. 60 63 61 class UnauthorizedPage(WAeUPPage): 64 Backport from grok 1.6. This is only a view (not a page) because 65 we cannot trust that the associated :exc:`Unauthorized` exceptions 66 happened inside a w.s. site. 67 68 If not, then we have no layout available at time of rendering. 69 70 XXX: This view is shared for all apps and objects in the ZODB root. 71 """ 62 72 grok.context(IUnauthorized) 63 73 grok.name('index.html') 64 74 grok.template('unauthorized') 65 75 66 title = u'Unauthorized' 76 def update(self): 77 return zope.errorview.browser.UnauthorizedView.update(self) 67 78 68 def update(self):69 self.error_context = self.context70 forbidden_view = self.context.args[0]71 self.context = forbidden_view.context72 pass73 79 74 80 class NotFoundPage(WAeUPPage):
Note: See TracChangeset for help on using the changeset viewer.