[Zope3-Users] Howto add roles to my principal

Christian Klinger cklinger at novareto.de
Wed Aug 8 06:25:08 EDT 2007


Hi,

i try to fetch users from an rdbms to authenticate them in zope3.

I have created a custom AuthenticatorPlugin which reads the
user from an sqltable and return the PrincipalInfo when
username password is valid. This works so far.

Now the Problem:

I have role information in my rdbms table and i want that
my principals get these roles.
But i don´t know how can i assign these roles
to my principal.

Maybe something like that:

    return PrincipalInfo(self.prefix+login, login, login, login, 
['Manager','Viewer',])

In Zope2 PAS there is a IRolesPlugin which assign the role to
the principal.


Maybe someone had an idea or an example for me.


Christian



More information about the Zope3-users mailing list