Andreas Elvers wrote:

I looked a bit deeper and found that zapi.principals().getPrincipal does
not know about principals defined in a local site. It will only return principals defined in zcml. zapi.principals().getPrincipal is used in in line 261 for Zope 3.2.0 and magically finds the right principal when a principal is added to a group through ZMI. But when I try to do:

mygroup.principals = ('pauprefix.principalprefix.principalid') it is simply not working. There must be some kind of hidden context. I think I'm missing a big link in the Zope3 puzzle. Can someone elaborate please ?

- Andreas


Zope3 stores the current site in a tread-global variable, so if you want to change this context, you have to set a hook like this:

    old_site =

    # do the pau things


Where root_folder is the object providing ISite (the site containing your PAU).

Michael Howitz

gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale · fon: +49 345 12298898 · fax: +49 345 12298891
Zope3-users mailing list

Reply via email to