[Zope3-checkins] CVS: Zope3/src/zope/app/browser - auth.py:1.3
Sidnei da Silva
sidnei at x3ng.com.br
Mon Aug 4 10:58:37 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser
In directory cvs.zope.org:/tmp/cvs-serv8309
Modified Files:
auth.py
Log Message:
Fix isinstance comparison by removeAllProxies'ing + whitespace.
=== Zope3/src/zope/app/browser/auth.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/auth.py:1.2 Fri Aug 1 09:47:38 2003
+++ Zope3/src/zope/app/browser/auth.py Mon Aug 4 09:58:02 2003
@@ -20,6 +20,7 @@
from zope.app.security.registries.principalregistry import \
UnauthenticatedPrincipal
from zope.app.pagetemplate import ViewPageTemplateFile
+from zope.proxy import removeAllProxies
class HTTPAuthenticationLogin(object):
@@ -27,7 +28,8 @@
def login(self, nextURL=None):
"""See zope.app.interfaces.security.ILogin"""
- if isinstance(self.request.user, UnauthenticatedPrincipal):
+ if isinstance(removeAllProxies(self.request.user), \
+ UnauthenticatedPrincipal):
self.request.unauthorized("basic realm='Zope'")
return self.failed()
else:
@@ -62,7 +64,7 @@
return self.confirmation()
else:
return self.request.response.redirect(nextURL)
-
+
confirmation = ViewPageTemplateFile('logout.pt')
redirect = ViewPageTemplateFile('redirect.pt')
More information about the Zope3-Checkins
mailing list