[Zope3-checkins] SVN: Zope3/branches/3.3/ Fixed issue 663, adding basic auth and session-credential

Jim Fulton jim at zope.com
Wed Jul 19 18:00:22 EDT 2006


Log message for revision 69215:
  Fixed issue 663, adding basic auth and session-credential
  plugins didn't work.
  
  Renamed the plugins view to contents,html.  We shouldn't need to do
  that but fixing the conetnts view as necessary would be too much work atm.
  

Changed:
  U   Zope3/branches/3.3/doc/CHANGES.txt
  U   Zope3/branches/3.3/src/zope/app/authentication/browser/adding.py
  U   Zope3/branches/3.3/src/zope/app/authentication/browser/configure.zcml
  U   Zope3/branches/3.3/src/zope/app/authentication/browser/ftests.py
  A   Zope3/branches/3.3/src/zope/app/authentication/browser/issue663.txt

-=-
Modified: Zope3/branches/3.3/doc/CHANGES.txt
===================================================================
--- Zope3/branches/3.3/doc/CHANGES.txt	2006-07-19 21:39:55 UTC (rev 69214)
+++ Zope3/branches/3.3/doc/CHANGES.txt	2006-07-19 22:00:21 UTC (rev 69215)
@@ -10,6 +10,9 @@
 
     Bugfixes
 
+      - Fixed issue 663, adding basic auth and session-credential
+        plugins didn't work.
+
       - Fixed issue 650, a test failure on Mac OS X that seemed to
         indicate deeper problems in ZEO's thread handling.  Refactored
         ZEO so that ZEO clients have their own asyncore loop and don't

Modified: Zope3/branches/3.3/src/zope/app/authentication/browser/adding.py
===================================================================
--- Zope3/branches/3.3/src/zope/app/authentication/browser/adding.py	2006-07-19 21:39:55 UTC (rev 69214)
+++ Zope3/branches/3.3/src/zope/app/authentication/browser/adding.py	2006-07-19 22:00:21 UTC (rev 69215)
@@ -23,4 +23,5 @@
 class Adding(zope.app.container.browser.adding.Adding):
     
     def nextURL(self):
-        return zapi.absoluteURL(self.context, self.request) + '/@@plugins.html'
+        return zapi.absoluteURL(self.context, self.request
+                                ) + '/@@contents.html'

Modified: Zope3/branches/3.3/src/zope/app/authentication/browser/configure.zcml
===================================================================
--- Zope3/branches/3.3/src/zope/app/authentication/browser/configure.zcml	2006-07-19 21:39:55 UTC (rev 69214)
+++ Zope3/branches/3.3/src/zope/app/authentication/browser/configure.zcml	2006-07-19 22:00:21 UTC (rev 69215)
@@ -45,7 +45,7 @@
       permission="zope.ManageServices" />
 
   <page
-      name="plugins.html"
+      name="contents.html"
       for="..interfaces.IPluggableAuthentication"
       menu="zmi_views" title="Plugins"
       permission="zope.ManageSite"

Modified: Zope3/branches/3.3/src/zope/app/authentication/browser/ftests.py
===================================================================
--- Zope3/branches/3.3/src/zope/app/authentication/browser/ftests.py	2006-07-19 21:39:55 UTC (rev 69214)
+++ Zope3/branches/3.3/src/zope/app/authentication/browser/ftests.py	2006-07-19 22:00:21 UTC (rev 69215)
@@ -118,6 +118,7 @@
             'group_searching_with_empty_string.txt'),
         functional.FunctionalDocFileSuite('special-groups.txt'),
         unittest.makeSuite(FunkTest),
+        functional.FunctionalDocFileSuite('issue663.txt'),
         ))
 
 if __name__ == '__main__':

Added: Zope3/branches/3.3/src/zope/app/authentication/browser/issue663.txt
===================================================================
--- Zope3/branches/3.3/src/zope/app/authentication/browser/issue663.txt	2006-07-19 21:39:55 UTC (rev 69214)
+++ Zope3/branches/3.3/src/zope/app/authentication/browser/issue663.txt	2006-07-19 22:00:21 UTC (rev 69215)
@@ -0,0 +1,54 @@
+http://www.zope.org/Collectors/Zope3-dev/663
+============================================
+
+Two plugins(basic-auth and session credentials) link
+on PAU add menu are broken and can't add them.
+
+For IPluggableAuthentication, "plugins.html" is a correct
+view name but "contents.html" is used.
+
+because menu implementation supporsing that all view
+uses "zope.app.container.browser.contents.Contents" are
+named "contents.html".
+
+In Zope3.2, PluggableAuthentication inherits
+SiteManagementFolder that provides "contents.html" view.
+
+    >>> from zope.testbrowser.testing import Browser
+    >>> browser = Browser()
+
+Create a pau
+
+    >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+    >>> browser.open('http://localhost/@@contents.html')
+    >>> browser.getLink('Pluggable Authentication Utility').click()
+    >>> browser.getControl(name='add_input_name').value = 'auth'
+    >>> browser.getControl('Add').click()
+    >>> browser.getLink('auth').click()
+
+Go to the plugins view
+
+    >>> browser.getLink('Plugins').click()
+
+Add aa basic auth plugin
+
+    >>> browser.getLink('HTTP Basic-Auth Plugin').click()
+    >>> browser.getControl(name='new_value').value = 'basic'
+    >>> browser.getControl('Apply').click()
+
+Add a session-credential plugin
+
+    >>> browser.getLink('Session Credentials Plugin').click()
+    >>> browser.getControl(name='new_value').value = 'session'
+    >>> browser.getControl('Apply').click()
+
+Make sure we can use them:
+
+    >>> browser.getLink('Configure').click()
+    >>> browser.getControl(name='field.credentialsPlugins.from').value = [
+    ...     'Wm9wZSBSZWFsbSBCYXNpYy1BdXRo']
+    >>> browser.getControl(name='field.credentialsPlugins.from').value = [
+    ...     'YmFzaWM=']
+    >>> browser.getControl(name='field.credentialsPlugins.from').value = [
+    ...     'U2Vzc2lvbiBDcmVkZW50aWFscw==']
+    >>> browser.getControl('Change').click()


Property changes on: Zope3/branches/3.3/src/zope/app/authentication/browser/issue663.txt
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the Zope3-Checkins mailing list