[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/pas/ Updated PAS and
the zodb-user plugin to use principalInfo rather than get
Jim Fulton
jim at zope.com
Fri Oct 29 17:33:26 EDT 2004
Log message for revision 28289:
Updated PAS and the zodb-user plugin to use principalInfo rather than get
to lookup principals in an IPrincipalSearchPlugin.
Changed:
U Zope3/trunk/src/zope/app/pas/README.txt
U Zope3/trunk/src/zope/app/pas/pas.py
U Zope3/trunk/src/zope/app/pas/zodb.py
-=-
Modified: Zope3/trunk/src/zope/app/pas/README.txt
===================================================================
--- Zope3/trunk/src/zope/app/pas/README.txt 2004-10-29 20:12:30 UTC (rev 28288)
+++ Zope3/trunk/src/zope/app/pas/README.txt 2004-10-29 21:33:26 UTC (rev 28289)
@@ -278,7 +278,7 @@
...
... zope.interface.implements(interfaces.IPrincipalSearchPlugin)
...
- ... def get(self, principal_id):
+ ... def principalInfo(self, principal_id):
... if principal_id == '42':
... return {'domain': 42}
@@ -289,7 +289,7 @@
...
... zope.interface.implements(interfaces.IPrincipalSearchPlugin)
...
- ... def get(self, principal_id):
+ ... def principalInfo(self, principal_id):
... try:
... i = int(principal_id)
... except ValueError:
Modified: Zope3/trunk/src/zope/app/pas/pas.py
===================================================================
--- Zope3/trunk/src/zope/app/pas/pas.py 2004-10-29 20:12:30 UTC (rev 28288)
+++ Zope3/trunk/src/zope/app/pas/pas.py 2004-10-29 21:33:26 UTC (rev 28289)
@@ -128,7 +128,7 @@
if searcher is None:
continue
- info = searcher.get(id)
+ info = searcher.principalInfo(id)
if info is None:
continue
Modified: Zope3/trunk/src/zope/app/pas/zodb.py
===================================================================
--- Zope3/trunk/src/zope/app/pas/zodb.py 2004-10-29 20:12:30 UTC (rev 28288)
+++ Zope3/trunk/src/zope/app/pas/zodb.py 2004-10-29 21:33:26 UTC (rev 28289)
@@ -247,6 +247,9 @@
return id, {'login': principal.login, 'title': principal.title,
'description': principal.description}
+ def principalInfo(self, principal_id):
+ return self.get(principal_id)
+
schema = ISearchSchema
def search(self, query, start=None, batch_size=None):
More information about the Zope3-Checkins
mailing list