We are implementing Plone as a document management system in a hospital setting. In doing so, the review process asks for two review steps:
There may be an easier way to approach this.
Plone workflows can be stacked; e.g. you can assign more than one workflow to a content type.
This means you can assign both a nurse and a doctor workflow, each handing out specific permissions. If you set up your roles correctly per workflow, your use-case should be easy to implement; just split Roles into those for nurses and doctors.
So, where a default workflow uses Reviewer, Editor, Contributor, Member, etc, use DoctorReviewer, NurseReviewer, DoctorEditor, NurseEditor, etc. That way the two workflows will handle two sets of parallel permissions, transitions and states.
I do not know enough about your use-cases if this will solve your problems at all, but I just wanted to make sure you knew about the option before exploring complex custom plugins.
you've to write your pas plugin. You can start from this: http://pypi.python.org/pypi/Products.AutoRoleFromHostHeader/ (works also for groups) and create your own which assign a role/group. This plugin is very simple and just do this:
security.declarePrivate('getRolesForPrincipal')
def getRolesForPrincipal(self, principal, request=None):
""" Assign roles based on 'request'. """
there, you can do your own logic and assign to the user a group based on the parameters defined at the document type level and assigned at the document instance level.
Instead of overloading the very simple built-in "Tags" field, you can also use Archetypes.Schemaextender to create a couple of custom fields (e.g. equipment, body part) that you can assign to each content item, then use those fields to assign the Nurse workflow to the right group of nurses and the Doctor workflow to the right group of Doctors, as described above.
PlacefulWorkflow may help if you create folders correctly to reflect your groups