Plone: ​​Add Role Permission

The Plone website has a permission called "access to inactive portal content." By default, this is provided to the Manager and Owner roles.

I want to grant this permission to the Editor role, and I know that I can just use the corresponding checkbox on the Security tab in ZMI, but I would like to do this programmatically in some kind of setup script. How can I do it?

+6
source share
1 answer

you need to create a new product and add a genericsetup template called "rolemap.xml" with this:

<?xml version="1.0"?> <rolemap> <permissions> <permission name="Access inactive portal content" acquire="False"> <role name="Editor" /> </permission> </permissions> </rolemap> 

Additional Information:

Bye, Giacomo

+11
source

Source: https://habr.com/ru/post/896307/


All Articles