Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
There are cases when a role needs to be able to view a piece of content and either approve it or reject it, but without the possibility to edit it. Is this feasible? How could it be implemented?
Comment | File | Size | Author |
---|---|---|---|
#10 | Selection_003.png | 18.76 KB | juampynr |
#10 | Selection_005.png | 87.8 KB | juampynr |
#10 | allow_a_role_to-2652158-10.patch | 488 bytes | juampynr |
#4 | 2652158-moderate-perm.patch | 6.25 KB | Crell |
Comments
Comment #2
juampynr CreditAttribution: juampynr at Lullabot commentedComment #3
juampynr CreditAttribution: juampynr at Lullabot commentedComment #4
Crell CreditAttribution: Crell at Palantir.net for Acquia commentedFunny story! In HEAD right now, you cannot moderate content you don't own yourself. That makes it rather pointless. :-)
The fix for that nicely fixes this, too. That is, we add a new permission for viewing all unpublished content, then make the view-latest tab depend on node-view rather than node-edit. Net result, access to the latest-revision tab is now entirely independent of edit permission, which controls the edit tab, and you can moderate content you don't own.
Comes with a new test, too. Let's make sure it all works.
Comment #5
becw CreditAttribution: becw at Palantir.net for Acquia commentedLovely, this works fine. It does enable a new UX weirdness, though: users without edit perms can't moderate from published -> other states, because the form is only ever displayed on the "Latest version" tab. I will create a new ticket for that.
Comment #6
becw CreditAttribution: becw at Palantir.net for Acquia commentedComment #9
Marishka_ CreditAttribution: Marishka_ commentedReopening issue as this still occurs in beta1 version.
I have setup a workflow with basic states: Draft > Review > Publish
The Approver role should not be able to edit content, but needs to move content from Review > Publish (or from Review > Draft). They cannot do this without the 'ContentType: Edit any content' permission enabled.
Comment #10
juampynr CreditAttribution: juampynr at Lullabot commentedThis issue introduced a new permission to access to the Latest Version tab: #2672122: Anonymous able to see "View" and "Latest Version" tabs.
By setting the following permissions I am able to allow an authenticated user to moderate but not to edit content:
Now, when the moderator user opens the Latest Version tab of a node in Needs Review, it can be moderated. However, if the moderator opens a node in state Needs Review, the "Transition to" form field would show as empty as the role does not have permission to moderate from this state:
Here is a patch that hides the moderation widget when this happens so the moderator can see content in Draft state, but has to wait until it gets to Needs Review in order to moderate it.
Comment #12
josephdpurcell CreditAttribution: josephdpurcell at Palantir.net for Acquia commentedI wasn't able to reproduce this exact issue as described, however I do see the scenario of a user being able to view the "Latest revision" but not able to transition the node to a different state. In that case, yes--this patch does address it.
Thank you!