[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/pas/ field loginpagename now used correctly

Helmut Merz helmutm at cy55.de
Tue Oct 12 13:02:23 EDT 2004


Log message for revision 28014:
  field loginpagename now used correctly


Changed:
  U   Zope3/trunk/src/zope/app/pas/browserplugins.py
  U   Zope3/trunk/src/zope/app/pas/challengeplugins.zcml


-=-
Modified: Zope3/trunk/src/zope/app/pas/browserplugins.py
===================================================================
--- Zope3/trunk/src/zope/app/pas/browserplugins.py	2004-10-12 16:06:06 UTC (rev 28013)
+++ Zope3/trunk/src/zope/app/pas/browserplugins.py	2004-10-12 17:02:21 UTC (rev 28014)
@@ -90,14 +90,14 @@
     loginpagename = TextLine(title=u'loginpagename',
                      description=u'Name of the login form used by challenger',
                      required=True,
-                     default=u'/@@loginForm.html')
+                     default=u'loginForm.html')
 
 
 class FormChallenger(Persistent, Contained):
     """ Query the user for credentials using a browser form.
 
         First we need a request and a response.
-        
+
         >>> from zope.app.tests.setup import placefulSetUp
         >>> site = placefulSetUp(True)
 
@@ -120,7 +120,7 @@
 
     implements(IChallengePlugin, IFormChallengerLoginPageName)
     
-    loginpagename = '/@@loginForm.html'
+    loginpagename = 'loginForm.html'
 
     def challenge(self, request, response):
         """ Response shuold redirect to login page cause Credebtials
@@ -130,8 +130,9 @@
         
         camefrom = request.getURL()
 
-        url = absoluteURL(site, request)
-        url += self.loginpagename + '?' + urlencode({'camefrom' :camefrom})
+        url = '%s/@@%s?%s' % (absoluteURL(site, request),
+                              self.loginpagename,
+                              urlencode({'camefrom' :camefrom}))
         response.redirect(url)
 
         return True

Modified: Zope3/trunk/src/zope/app/pas/challengeplugins.zcml
===================================================================
--- Zope3/trunk/src/zope/app/pas/challengeplugins.zcml	2004-10-12 16:06:06 UTC (rev 28013)
+++ Zope3/trunk/src/zope/app/pas/challengeplugins.zcml	2004-10-12 17:02:21 UTC (rev 28014)
@@ -42,13 +42,6 @@
       permission="zope.ManageServices"
       />
 
-  <localUtility class=".browserplugins.FormChallenger">
-
-    <implements
-        interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
-
-  </localUtility>
-
   <browser:addMenuItem
       title="PAS Browser Session Challenge Plugin"
       description="A PAS Challenge Plugin"
@@ -60,7 +53,7 @@
 
     <implements
         interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
-        
+
     <require
         permission="zope.ManageServices"
         interface=".browserplugins.IFormChallengerLoginPageName"



More information about the Zope3-Checkins mailing list