Bulk operations actions skip "publishcontent" defined permissions.
The users cannot publish / unpublish content with bulk operations even if all the publishcontent defined permissions are checked.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | permissions-for-bulk-operations-2820867-12.patch | 967 bytes | berliner |
| #9 | permissions-for-bulk-operations-2820867-9.patch | 942 bytes | natemow |
| #7 | 2820867-7-permissions-for-bulk-operations.patch | 1.04 KB | anfor |
| #2 | 2820867-2-permissions-for-bulk-operations.patch | 795 bytes | DeFr |
Issue fork publishcontent-2820867
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
DeFr commentedHad the same issue.
Attached patch fix it by implementing hook_entity_field_access_alter.
Comment #3
RAWDESK commentedReviewed and tested successfully.
PS. There's something wrong with the testing queue which provides a D7 PHP5 test.
Comment #4
tlwatson+1. This patch worked for me - it applies 1.1 without issues.
UPDATE: turns out not so much. I can now publish/unpublish content I authored, but NOT that someone else authored, from the /admin/content page. I have permission to do so and can do it individually from the node page.
Turns out this may be an issue with content_moderation.
Comment #5
tlwatsonComment #6
dionsjAs mentioned in #3, the test shows it as the D7 version, but this patch is for the D8 version (as the issue also correctly states), just mentioning it here as I was initially quite confused.
I have also applied the patch to 8.x-1.1 and it applies cleanly (creates the missing .module file with the hook from the patch)
As mentioned in #4, there may be issues with content moderation, as without the module I can publish/unpublish content from other users just fine, but with it I can only do so with my own content.
+1 from me for this patch, it makes the module work with Views Bulk Operations (VBO).
Comment #7
anfor commentedThe publishcontent.module has since been created, I reroll previous patch for 8.x-1.2 release.
Comment #8
seutje commentedPatch in #7 still applies cleanly and does the trick.
Comment #9
natemow commentedReroll for 1.7.
Comment #10
berliner commentedLast patch applies properly to 1.7. Thanks for the re-roll.
Comment #11
la558 commentedPatch @#9 worked perfect for allowing bulk operations.
Thanks
However, although I have it set to "Create new revision when publising/unpublishing a node" when performing bulk operations it does not create a new revision.
Are you aware of any workaround for this?
Comment #12
berliner commentedRe-rolled patch for 1.8. Changes are identical but this one plays nicer with composer-patches v2.
Comment #13
robcarrPatch at #12 works great with latest release. Thanks for everyone's work on this