[Zope3-Users] Assigning roles to principals

mats.nordgren mats at ronin-group.org
Wed Jun 14 14:15:47 EDT 2006


Marco,

You need to pass the id not the principal object.

principalRoleManager.getRolesForPrincipal(self.request.principal.id)

Cheers,

Mats

On Wed, 14 Jun 2006 20:00:40 +0200, Marco Mariani wrote
> How do I get the list of roles for the current principal?
> 
> I've tried
> 
> from zope.app.securitypolicy.principalrole import principalRoleManager
> 
> principalRoleManager.getRolesForPrincipal(self.request.principal)
> 
> and the list is empty
> 
> I'm currently defining principals in principals.zcml
> 
> tnx
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users



More information about the Zope3-users mailing list