Update "Assigned" userlist when changing to next status
When editing content which has a workflow an Assinged user can be chosen. Currently all users can be chosen.
When the status is not changed AND the current user have write access to the current state all users can be chosen. Because: when you are assigned to the item, you can delegate it to any other user.
When another Next status is chosen OR the current user does not have write access to the current state (in this case he can change the item because he is assigned as a delegate) the userlist must be filtered: only users with WRITE access in the chosen state can be chosen. This must also be validated when saving (to prevent users to hack it with firebug)
The assinged select box must be changed to the integrated_select2 formtype from the IntegratedFormtypeBundle (which implements http://select2.github.io/select2/). This also makes sure you can use ajax to get the filtered userlist.
How to prepare the WorkFlowBundle to reproduce the problem
Make sure you install the WorkFlowBundle first: https://bitbucket.org/eactive/integrated-workflow-bundle/overview
Go to Manage - Workflow. Add a new workflow. The new workflow needs a name and some states. For example: Draft and Published. One state needs to be the default. Write permissions for the default state need to be available for specific groups only.
Go to the menu: Manage - Content types. Edit a content type. Choose the Workflow you just created for this content type.
Create or edit some content to see the workflow features (see screenshot)
Note: workflow configuration is saved in ORM (mysql)
.Notificatie oplevering gestuurd naar Integrated Marijn (firstname.lastname@example.org)