Skipping Workflow WIth Permissions
Permalink
I've set up the basic workflow as per the tutorials, but we're having issues because even admins get the "submit to workflow button". How do I remove this and let certain groups skip the workflow altogether?
We 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.)
We 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.)
Thanks for posting your solution to 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?
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?
To be clear, you should be overriding the file as per the standard c5
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
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
Just wanted to say thanks for the solution jshannon, the prospect of my admins having to go through workflow for their own edits was a bug bare.
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.
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.