Open uandco opened 1 year ago
Hmmm, now that is indeed tricky. In that scenario, there's a "Save" or "Apply" button on the top-right of the page to save the entry (without Workflow factored in at all), due to the permissions for the user. This is because they can't do anything with the entry, but Workflow should probably be aware of that.
I think if anything, maybe the Workflow panel shouldn't be shown in this scenario as you can't do anything meaningful. We should also probably be adding a check to approval process on the Workflow area as well.
Describe the bug
I had forgotten to set the permission
Save other users’ drafts
on my a reviewer.When viewing an entry requiring approval as this reviewer, the comment/approve/reject section would show up as normal but none of the buttons would work (nothing happened at all when clicking, no XHR request, no JS error, just as if the click event was disabled).
From the workflow submissions list, the same user could still approve/reject though.
I reckon it comes from how Craft handles the sidebar, and would prevent anything to be modified from the entry page if the user attempting the change doesn't have the permission to do so.
I'm not sure what's the best fix for this. Either bypass the check and still allow the approve/reject, or not show the comment/approve/reject section at all, or display a warning message mentioning higher permissions are needed (I would go with that one).
Steps to reproduce
Save other users’ drafts
permission for entries (for example pages) on the reviewer groupCraft CMS version
Craft Pro 4.3.7.1
Plugin version
2.0.3
Multi-site?
No
Additional context
No response