Is there a way to programatically assign roles such as can add can edit on a plone website. I would really appreciate if there is a way to do so because i have to be going through every folders on my website and assign roles to each folders which is very tedious and time consuming.
im using plone 4.3 under python 2.7. Any any help would be appreciated, thanks in advance.
do i have to manually do it? i have a lot of folders on my website and to go through all of them and add the sharing permissions is tedious. i was wondering if there is a way to program the sharing permissions to the folder.
You might want to describe exactly what is repetitive, so we can better help you understand your options? Diffferent folders often need different sharing setup.
You should also be thinking about:
(1) groups, not roles; groups are the means to the end of having the right role;
(2) Having workflow definition define your common role to permission binding for folder type(s).
A hunch: if the sharing tab is not what you want, a custom workflow definition is. These are easy to tweak from default workflows/permission, and are well documented (the workflow engine here, DCWorkflow, was written over 15 years ago, and has not changed much at all -- plus, you can do all this in a browser in the ZMI, then export your custom workflow to an installable product).
Add those users to the 'Contributors' and 'Reviewers' groups, respectively. That'll give them those rights globally across the site. If that's not what you want, you can restructure your site tree to minimize clicks (permissions are inherited). Or, set up a custom workflow.