For which Plone version are you programming ?
For Plone 2.5 or Plone 3.0 you should use a Generic Setup profile to do
this.
Take a look at CMFPlone/profile/default/rolemap.xml

Mark Phillips a écrit :
> I am writing a new workflow for my plone site, and I need to create a
> new role for the workflow. I can add the new role through the ZMI by:
> 1. adding the role to zcl_users
> 2. adding the role under the Security tab
> 
> I can accomplish the first task with this code in my Install.py:
> acltool = getToolByName(self, 'acl_users')
>     rmanager = acltool.portal_role_manager
>     roleIds = rmanager.listRoleIds()
>     if not 'Editor' in roleIds:
>         rmanager.addRole('Editor', title="Content Editor")
>         print >> out, "Added Editor role"
>     else:
>         print >> out, "Editor Role already in place"
> 
> How do I add the role under the security tab in the root of my site?
> 
> If I just do the above, the role does not show up anywhere in the site.


-- 
Encolpe Degoute
INGENIWEB (TM) - S.A.S 50000 Euros - RC B 438 725 632
17 rue Louise Michel - 92300 Levallois Perret - France
web : www.ingeniweb.com - « les Services Web Ingénieux »
Tel : 01.78.15.24.08 / Fax : 01 47 57 39 14


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to