[Zope3-Users] grant via zcml vs zmi

2009-06-04 Thread John
After working through Paul Carduner's z3c tutorial, I removed this zcml: and created two users that I thought should have equal permissions, one called 'user' via this zcml: and the other called 'user2', which I created in a PrincipalFolder under a registered pau and granted the Manage

Re: [Zope3-Users] Assigning programmatically a Role to a Principal

2009-06-04 Thread Simon Elbaz
Hi, I have a similar difficulty. In site.zcml, the role 'zope.Member' is defined and a permission is granted: How can I assign a role to a principal who is created on the fly: a_principal = zope.app.authentication.principalfolder.InternalPrincipal(login=tab[0].encode('utf-8'), password=tab[1].e

Re: [Zope3-Users] Assigning programmatically a Role to a Principal

2009-06-04 Thread Jens
in grok I do: @grok.subscribe(IPrincipalCreated) def update_principal_info(event): principal = event.principal ... app = grok.getSite() ... prm = IPrincipalRoleManager(app) prm.assignRoleToPrincipal('some_role', principal.id) somthing like this. maybe in zope3 this is similar. Jens Simon