[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/exception/browser/unauthorized.py bugfix by the one and only stephan richter

Ralph Barthel ralph.barthel at 21ll.com
Mon Oct 11 09:45:42 EDT 2004


Log message for revision 27977:
  bugfix by the one and only stephan richter


Changed:
  U   Zope3/trunk/src/zope/app/exception/browser/unauthorized.py


-=-
Modified: Zope3/trunk/src/zope/app/exception/browser/unauthorized.py
===================================================================
--- Zope3/trunk/src/zope/app/exception/browser/unauthorized.py	2004-10-11 13:43:22 UTC (rev 27976)
+++ Zope3/trunk/src/zope/app/exception/browser/unauthorized.py	2004-10-11 13:45:42 UTC (rev 27977)
@@ -28,11 +28,5 @@
         # challenge the user
         self.request.response.setStatus(403)
         principal = self.request.principal
-        prinreg = zapi.getParent(principal)
-        if not IAuthenticationService.providedBy(prinreg):
-            # With PluggableAuthenticationService, principals are
-            # contained in the PrincipalSource, which is contained in
-            # the service.
-            prinreg = zapi.getParent(prinreg)
-        assert IAuthenticationService.providedBy(prinreg)
-        prinreg.unauthorized(principal.id, self.request)
+        auth = zapi.getService(zapi.servicenames.Authentication)
+        auth.unauthorized(principal.id, self.request)



More information about the Zope3-Checkins mailing list