Understanding permissions and security
Plone uses a combination of low-level Zope permissions, roles, local roles and workflows to manage permissions on objects. Understanding these will help you manage how, and by whom, your Plone site is accessed.
- Permissions and roles The Zope security model is the first thing you need to understand.
- Groups in Plone Plone adds the concept of a group of users to the basic Zope security model. Groups are convenient ways of managing roles (and thus permissions) for a number of users simultaneously.
- Local roles and sharing Often, you want to give a user or group specific (usually elevated) permissions in a specific area of your site, but not site-wide. Enter local roles and the 'sharing' tab.
- Controlling access with workflows In most instances, workflows, managed via the portal_workflow tool, are the correct way of managing permissions on your content.
- Using permissions and workflow in your custom products When you are developing a Plone site, it is usually best to develop your customisations or new content types on the filesystem, as a new Zope product. Setting up workflows programatically using the portal_workflow tool is a bit of a pain, but luckily there are tools to make your life much easier. You also need to ensure you use the correct permission declarations on your objects.
All content on one page (useful for printing, presentation mode etc.)
Success Following Instructions
I installed DCWorkflowDump from the collective using the two commands from my Products/ folder:
<pre>
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/collective login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/collective co -P DCWorkflowDump
</pre>
(more here: http://sourceforge.net/cvs/?group_id=55262)
Then, I designed my workflow following Chapter 8 "Managing Workflow" in the McKay book:
http://docs.neuroinf.de/PloneBook
Next, I went to the 'dump' tab of my workflow, and cut-and-paste the module into MyProduct/Extensions/MyCustomWorkflow.py
Then I added code into MyProduct/Extensions/Install.py to install the workflow, and bind it to my content type. The only things to point out are, you need to
<pre>
from Products.CMFCore.utils import getToolByName
</pre>
and keep in mind that wf_tool.manage_addWorkflow(workflowType,id), where id probably looks like 'mycustom_workflow (DC Workflow Definition)'. The part in parenthesis is the title used by addWorkflowFactory() in the dumped script.
</pre>