[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/pluggableauth - __init__.py:1.4.18.2 configure.zcml:1.10.4.1

Jim Fulton jim at zope.com
Fri Sep 12 15:15:44 EDT 2003


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

Modified Files:
      Tag: parentgeddon-branch
	__init__.py configure.zcml 
Log Message:
Can't have the tests passing, can we?

=== Zope3/src/zope/app/browser/services/pluggableauth/__init__.py 1.4.18.1 => 1.4.18.2 ===
--- Zope3/src/zope/app/browser/services/pluggableauth/__init__.py:1.4.18.1	Mon Sep  8 14:21:28 2003
+++ Zope3/src/zope/app/browser/services/pluggableauth/__init__.py	Fri Sep 12 15:15:13 2003
@@ -15,7 +15,10 @@
 
 $Id$
 """
-from zope.app.browser.services.service import Adding
+
+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,3 +32,13 @@
             raise TypeError("%s is not a readable principal source" % content)
 
         return super(PrincipalSourceAdding, self).add(content)
+
+class PrincipalAdd(BrowserView):
+
+    def add(self, content):
+        name = zapi.add(self.context, content.login, content)
+        return self.context[name]
+
+    def nextURL(self):
+        return "@@contents.html"
+


=== Zope3/src/zope/app/browser/services/pluggableauth/configure.zcml 1.10 => 1.10.4.1 ===
--- Zope3/src/zope/app/browser/services/pluggableauth/configure.zcml:1.10	Mon Aug 25 15:28:40 2003
+++ Zope3/src/zope/app/browser/services/pluggableauth/configure.zcml	Fri Sep 12 15:15:13 2003
@@ -52,26 +52,23 @@
        class="zope.app.browser.container.contents.Contents"
        attribute="contents" />
 
-  <view
-      name="+"
-      for="zope.app.services.pluggableauth.IContainerPrincipalSource"
-      permission="zope.ManageContent"
-      class="zope.app.browser.container.adding.Adding" />
-
   <menuItem
       menu="zmi_actions" title="Add Principal"
       for="zope.app.services.pluggableauth.IContainerPrincipalSource"
-      action="+/AddPrincipalForm" />
+      action="AddPrincipalForm.html" />
 
   <addform
+      for="zope.app.services.pluggableauth.IContainerPrincipalSource"
       schema="zope.app.interfaces.services.pluggableauth.IUserSchemafied"
       label="Add Simple User with details"
       content_factory="zope.app.services.pluggableauth.SimplePrincipal"
       arguments="login password"
       keyword_arguments="title description"
       fields="login password title description"
-      name="AddPrincipalForm"
-      permission="zope.ManageContent" />
+      name="AddPrincipalForm.html"
+      permission="zope.ManageContent"
+      class=".PrincipalAdd"
+      />
 
   <editform
       schema="zope.app.interfaces.services.pluggableauth.IUserSchemafied"




More information about the Zope3-Checkins mailing list