[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services/pluggableauth - __init__.py:1.4
Stephan Richter
srichter@cosmos.phy.tufts.edu
Thu, 3 Jul 2003 17:46:01 -0400
Update of /cvs-repository/Zope3/src/zope/app/interfaces/services/pluggableauth
In directory cvs.zope.org:/tmp/cvs-serv24319/src/zope/app/interfaces/services/pluggableauth
Modified Files:
__init__.py
Log Message:
- Got rid of IWritePrincipalSource interface and IReadPrincipalSource to
become IPrincipalSource (based on Jim's IRC request)
- Then I noticed that some browser directives assumed that IPrincipalSource
objects are automatically are IContainers, which is of course not true.
So I added a IContainerPrincipalSource marker interface for principal
sources that are containers (this way we can reuse the container screens).
=== Zope3/src/zope/app/interfaces/services/pluggableauth/__init__.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/interfaces/services/pluggableauth/__init__.py:1.3 Thu Jul 3 11:42:45 2003
+++ Zope3/src/zope/app/interfaces/services/pluggableauth/__init__.py Thu Jul 3 17:45:27 2003
@@ -1,4 +1,5 @@
from zope.interface import Interface
+from zope.app.interfaces.container import IContainer
from zope.app.interfaces.security import IAuthenticationService
from zope.schema import TextLine, Password
from zope.i18n import MessageIDFactory
@@ -37,7 +38,7 @@
If id is not present, raise KeyError.
"""
-class IReadPrincipalSource(Interface):
+class IPrincipalSource(Interface):
"""A read-only source of IPrincipals.
"""
@@ -61,14 +62,7 @@
similar to (e.g. contain) the given name.
"""
-class IWritePrincipalSource(Interface):
- """A write-only source of IPrincipals.
- """
-
-class IPrincipalSource(IReadPrincipalSource, IWritePrincipalSource):
- """A read-write principal source."""
-
-class ILoginPasswordPrincipalSource(Interface):
+class ILoginPasswordPrincipalSource(IPrincipalSource):
""" A principal source which can authenticate a user given a
login and a password """
@@ -85,3 +79,6 @@
effecting his security profile on the site. """
+class IContainerPrincipalSource(IPrincipalSource, IContainer):
+ """This is a marker interface for specifying principal sources that are
+ also containers. """