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

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Feb 14 22:11:14 EST 2004


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

Modified Files:
	__init__.py 
Log Message:
Clean up doc strings.

Made sure principal sources get their promised location.

Do we still need: "from __future__ import generators"?


=== Zope3/src/zope/app/services/pluggableauth/__init__.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/services/pluggableauth/__init__.py:1.8	Sun Sep 21 13:33:05 2003
+++ Zope3/src/zope/app/services/pluggableauth/__init__.py	Sat Feb 14 22:11:14 2004
@@ -15,7 +15,6 @@
 
 $Id$
 """
-
 from __future__ import generators
 import random
 import sys
@@ -41,6 +40,7 @@
 from zope.app.interfaces.services.service import ISimpleService
 from zope.app.component.nextservice import queryNextService
 from zope.app import zapi
+from zope.app.location import locate
 from zope.app.traversing import getPath
 from zope.exceptions import NotFoundError
 from zope.app.container.contained import Contained, setitem, uncontained
@@ -167,7 +167,8 @@
 
         if not IPrincipalSource.isImplementedBy(principal_source):
             raise TypeError("Source must implement IPrincipalSource")
-        self[id] = principal_source
+        locate(principal_source, self, id)
+        self[id] = principal_source        
 
     def removePrincipalSource(self, id):
         """ See IPluggableAuthenticationService.
@@ -448,9 +449,7 @@
         self.description = description
 
     def getId(self):
-        """ See IPrincipal.
-
-        """
+        """See IPrincipal."""
         source = self.__parent__
         auth = source.__parent__
         return "%s\t%s\t%s" %(auth.earmark, source.__name__, self.id)
@@ -460,11 +459,11 @@
         return self.title
 
     def getDescription(self):
-        """ See IPrincipal. """
+        """See IPrincipal."""
         return self.description
 
     def getLogin(self):
-        """ See IReadUser. """
+        """See IReadUser."""
         return self.login
 
     def validate(self, test_password):




More information about the Zope3-Checkins mailing list