[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/pluggableauth - __init__.py:1.5

Jim Fulton jim at zope.com
Sun Sep 21 13:30:54 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/services/pluggableauth
In directory cvs.zope.org:/tmp/cvs-serv12492/src/zope/app/browser/services/pluggableauth

Modified Files:
	__init__.py 
Log Message:
No longer use context super. Just use super.

Changed to not use adding components for adding principals to
principal sources.


=== Zope3/src/zope/app/browser/services/pluggableauth/__init__.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/services/pluggableauth/__init__.py:1.4	Thu Jul 10 05:27:40 2003
+++ Zope3/src/zope/app/browser/services/pluggableauth/__init__.py	Sun Sep 21 13:30:53 2003
@@ -15,8 +15,10 @@
 
 $Id$
 """
-from zope.app.browser.services.service import Adding
-from zope.context import ContextSuper
+
+from zope.app import zapi
+from zope.app.publisher.browser import BrowserView
+from zope.app.browser.container.adding import Adding
 from zope.app.interfaces.services.pluggableauth import IPrincipalSource
 
 class PrincipalSourceAdding(Adding):
@@ -29,4 +31,15 @@
         if not IPrincipalSource.isImplementedBy(content):
             raise TypeError("%s is not a readable principal source" % content)
 
-        return ContextSuper(PrincipalSourceAdding, self).add(content)
+        return super(PrincipalSourceAdding, self).add(content)
+
+class PrincipalAdd(BrowserView):
+
+    def add(self, content):
+        name = content.login
+        self.context[name] = content
+        return self.context[name]
+
+    def nextURL(self):
+        return "@@contents.html"
+




More information about the Zope3-Checkins mailing list