Commit 9497e8ef authored by Hanno Schlichting's avatar Hanno Schlichting

Correctly handle unauthorized exceptions in the ZPublisherExceptionHook.

parent 0c05765a
...@@ -16,6 +16,10 @@ Features Added ...@@ -16,6 +16,10 @@ Features Added
* ZODB 3.9.0b2 * ZODB 3.9.0b2
Bugs Fixed
++++++++++
- Correctly handle unauthorized exceptions in the ZPublisherExceptionHook.
Zope 2.12.0 b2 (2009/05/27) Zope 2.12.0 b2 (2009/05/27)
--------------------------- ---------------------------
......
...@@ -24,6 +24,7 @@ from App.config import getConfiguration ...@@ -24,6 +24,7 @@ from App.config import getConfiguration
from time import asctime from time import asctime
from types import StringType, ListType from types import StringType, ListType
from zExceptions import Redirect from zExceptions import Redirect
from zExceptions import Unauthorized
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
import transaction import transaction
import AccessControl.User import AccessControl.User
...@@ -170,7 +171,7 @@ class ZPublisherExceptionHook: ...@@ -170,7 +171,7 @@ class ZPublisherExceptionHook:
if t.lower() in ('unauthorized', 'redirect'): if t.lower() in ('unauthorized', 'redirect'):
raise raise
else: else:
if t is SystemExit or t is Redirect: if t is SystemExit or t is Redirect or t is Unauthorized:
raise raise
if issubclass(t, ConflictError): if issubclass(t, ConflictError):
......
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