Skipping Workflow WIth Permissions
PermalinkWe have an "editors" group. I created a basic workflow and added that group to the "approve or deny" "set". I then attached that workflow to the "approve changes" permission.
I started by removing all other permissions. I don't think it's clear that, when a workflow is attached, the otherwise-standard permissions are still required in order "to enter the workflow". I edited a page with the user and they weren't able to submit to the workflow at all. Then I added "editors" and "authors" to "approve changes".
Now, when an editor makes a change, they get the "submit to workflow" button instead of "save page", as I'd expect for an "author". When an editor clicks that, the page reloads and they get "approve changes" dropdown. That's what I want to remove.
(This is on 5.6.12, but I don't see anything in the 5.6.2 changelog that might have addressed this.)
I'm loathe to touch core files, but it makes sense that any workflow approvers, admins, or at least the superuser should be able to skip the workflow process.
Have you experienced any fallout from this approach?
method, and only overriding that particular function (which is thankfully
pretty light, and thus less likely to be changed in the future).
But, otherwise, no. I never ran into any problems with that approach.
James
For anyone who wants it, I've attached the file which should be stored in:
/siteroot/models/workflow/types/basic.php
When you hover over Edit to save the page, it will still read "Submit to Workflow", but the actual effect is approving the workflow.
Maybe I'll look at overriding that this afternoon and come back.
I wrappedhttps://github.com/concrete5/concrete5/blob/master/web/concrete/core... with an if statement, effectively replacing them with:
ie, if the user has approval permissions, then immediately approve, effectively skipping the workflow, but yet still providing some logging.