[Zope-dev] PAU question - how to I handle roles on principals
Christophe Combelles
ccomb at free.fr
Thu Dec 6 13:26:59 EST 2007
kevin gill a écrit :
> I have created a simple authenticator plug-in. It allows me to load my
> users from my database. The plug-in only allows me to control the name of
> a principal and validate their user name / password.
>
> I need to tell Zope which roles different users have. I have the roles
> stored on the database.
>
> How do I develop/install a plug-in/adapter which will will be invoked for
> the getRolesForPrincipal() method or be invoked as the
> IPrincipalRoleManager adapter?
>
> My authenticator just is setup to produce a
> zope.app.authentication.principalfolder.Principal for the Principal
> Object.
>
> Thanks
>
> Kevin
Hi,
I suppose you have to use a PrincipalAnnotations utility, which can store
anything about principals which are not in the zodb (metadata, roles, etc.).
(look at zope.app.principalannotations)
Christophe
More information about the Zope-Dev
mailing list