Re: [Zope-dev] PAU question - how to I handle roles on principals

2007-12-06 Thread Christophe Combelles

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
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] PAU question - how to I handle roles on principals

2007-12-06 Thread kevin gill

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



___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )