[Zope3-Users] Assigning roles to principals

Frank Burkhardt fbo2 at gmx.net
Wed Jun 14 10:08:48 EDT 2006


Hi,

I implemented a small IAuthenticatorPlugin which manages a list of
principals. Those principals dont seem to have any global permissions. I
zcml-registered a role and a permission ( both are named
'mpgsite.Authenticated' ) and would like all of my principals the role to be
assigned to.

I tried to do

 principalRoleManager.assignRoleToPrincipal(
   'mpgsite.Authenticated',
   principal_id,
   check=False
 )
 
whenever a principal is created but it doesn't seem to help. How could I
solve this problem? Is there a chance to map a an arbitrary permission to
the authenticatedGroup ?

<grant permission="mpgsite.Authenticated" principal="zope.Authenticated" />

didn't work ("Undefined principal id").


Regards,

Frank



More information about the Zope3-users mailing list