[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/security/ Sprinting
with Jim:
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Oct 13 03:33:17 EDT 2004
Log message for revision 28039:
Sprinting with Jim:
Adding a special source interface for principal sources.
Changed:
U Zope3/trunk/src/zope/app/security/interfaces.py
U Zope3/trunk/src/zope/app/security/vocabulary.py
-=-
Modified: Zope3/trunk/src/zope/app/security/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/security/interfaces.py 2004-10-13 07:31:17 UTC (rev 28038)
+++ Zope3/trunk/src/zope/app/security/interfaces.py 2004-10-13 07:33:15 UTC (rev 28039)
@@ -18,6 +18,7 @@
from zope.interface import Interface
from zope.app.i18n import ZopeMessageIDFactory as _
from zope.schema import Text, TextLine
+from zope.schema.interfaces import ISource
class IPrincipal(Interface):
"""Principals are security artifacts that execute actions in a security
@@ -195,3 +196,6 @@
description=_("Provides a description for the permission."),
required=False)
+
+class IPrincipalSource(ISource):
+ """A Source of Principal Ids"""
Modified: Zope3/trunk/src/zope/app/security/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/security/vocabulary.py 2004-10-13 07:31:17 UTC (rev 28038)
+++ Zope3/trunk/src/zope/app/security/vocabulary.py 2004-10-13 07:33:15 UTC (rev 28039)
@@ -21,10 +21,12 @@
from zope.app import zapi
from zope.interface import implements
from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
-from zope.schema.interfaces import ISource, ISourceQueriables
+from zope.schema.interfaces import ISourceQueriables
from zope.app.security.interfaces import IPermission
from zope.app.component.localservice import queryNextService
+from interfaces import IPrincipalSource
+
class PermissionIdsVocabulary(SimpleVocabulary):
"""A vocabular of permission IDs.
@@ -101,7 +103,7 @@
class PrincipalSource(object):
"""Generic Principal Source"""
- implements(ISource, ISourceQueriables)
+ implements(IPrincipalSource, ISourceQueriables)
def __contains__(self, id):
"""Test for the existence of a user.
More information about the Zope3-Checkins
mailing list