[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/pluggableauth/ The interfaces about containment were messed up. Fixed that to have a

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Aug 16 18:10:59 EDT 2004


Log message for revision 27154:
  The interfaces about containment were messed up. Fixed that to have a
  correct IContainedPrincipalSource and a IContainerPrincipalSource.
  


Changed:
  U   Zope3/trunk/src/zope/app/pluggableauth/__init__.py
  U   Zope3/trunk/src/zope/app/pluggableauth/interfaces.py


-=-
Modified: Zope3/trunk/src/zope/app/pluggableauth/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/pluggableauth/__init__.py	2004-08-16 20:20:36 UTC (rev 27153)
+++ Zope3/trunk/src/zope/app/pluggableauth/__init__.py	2004-08-16 22:10:58 UTC (rev 27154)
@@ -50,8 +50,8 @@
 from zope.app.component.localservice import queryNextService
 
 from interfaces import IUserSchemafied, IPluggableAuthenticationService
-from interfaces import \
-     IPrincipalSource, ILoginPasswordPrincipalSource, IContainerPrincipalSource
+from interfaces import IPrincipalSource, ILoginPasswordPrincipalSource
+from interfaces import IContainedPrincipalSource, IContainerPrincipalSource
 
 def gen_key():
     """Return a random int (1, MAXINT), suitable for use as a `BTree` key."""
@@ -233,6 +233,7 @@
 class IBTreePrincipalSource(
     ILoginPasswordPrincipalSource,
     IContainerPrincipalSource,
+    IContainedPrincipalSource,
     INameChooser,
     IContainerNamesContainer,
     ):

Modified: Zope3/trunk/src/zope/app/pluggableauth/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/pluggableauth/interfaces.py	2004-08-16 20:20:36 UTC (rev 27153)
+++ Zope3/trunk/src/zope/app/pluggableauth/interfaces.py	2004-08-16 22:10:58 UTC (rev 27154)
@@ -106,9 +106,15 @@
         effecting his security profile on the site.  """
 
 
-class IContainerPrincipalSource(IPrincipalSource, IContained):
+class IContainerPrincipalSource(IContainer):
     """This is a marker interface for specifying principal sources that are
     also containers. """
+    
 
+class IContainedPrincipalSource(IPrincipalSource, IContained):
+    """This is a marker interface for principal sources that can be directly
+    added to an authentication service. It ensures that principal source can
+    **only** be added to pluggable authentication services."""
+
     __parent__= Field(
         constraint = ContainerTypesConstraint(IPluggableAuthenticationService))



More information about the Zope3-Checkins mailing list