[Zope3-Users] Re: how to catalog principal annotations?

2006-11-03 Thread Philipp von Weitershausen

Dominique Lederer wrote:

I have users residing in an external database.I store user data with
principal annotations. Now i want to create a view where users with a
special annotation are listed.

Is it possible to catalog principal annotations and how?


Sure. catalog.index_doc(obj) should do it (where obj is the principal). 
Then you should have an indices configured to index whichever fields you 
want to index. Of course, those fields should be coming from an adapter 
for the principal that you have to create. THe adapter would look at the 
principal's annotation.


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: how to catalog principal annotations?

2006-11-03 Thread Gary Poster


On Nov 3, 2006, at 11:39 AM, Philipp von Weitershausen wrote:


Dominique Lederer wrote:

I have users residing in an external database.I store user data with
principal annotations. Now i want to create a view where users with a
special annotation are listed.
Is it possible to catalog principal annotations and how?


Sure. catalog.index_doc(obj) should do it (where obj is the  
principal). Then you should have an indices configured to index  
whichever fields you want to index. Of course, those fields should  
be coming from an adapter for the principal that you have to  
create. THe adapter would look at the principal's annotation.


This will work if you have a key reference implementation  
specifically for principals.  The default key reference impl. is just  
for persistent objects, and standard Zope 3 principals are transient,  
generated for the current request by the pluggable auth utility.


Gary
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users