[Zope3-Users] Re: principal without dot

Philipp von Weitershausen philipp at weitershausen.de
Wed Feb 28 15:34:36 EST 2007


Florian Lindner wrote:
> Hello,
> this is the entry from principals.zcml created by mkzopeinstance (a bit 
> modified):
> 
>   <principal
>     id="something.Florian"
>     title="Manager"
>     login="florian"
>     password_manager="Plain Text"
>     password="123"
>     />
> 
> but can I set a id that does not contain a dot?
> I ask because I display DC creator metadata on a page and something like 
> Florian just looks better than something.Florian.

Principal IDs should preferrably have dots in order to attempt to be 
unique throughout the whole Zope instance, even if there is more than 
one principal source around (and two principal sources could both have a 
Florian principal, so they better be distinguishable).

The Principal ID isn't really something to show to the public. You want 
to get a hold of the principal that's behind soemthing.Florian 
(principal = getUtility(IAuthentication).getPrincipal(id)) and then 
print its title (principal.title).


-- 
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5



More information about the Zope3-users mailing list