Problem/Motivation
When the content_moderation module (from core) is enabled, a new permission is available for the roles :"View any unpublished content".
This permission allow the users with it, to see the content that has not been published even if they are not the authors.
I suggest to update the "Content access" in order to take this permission into account in addition to 'view own unpublished content' and 'access content' (which are already managed).
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3327383-5--content_access_view_unpublished.patch | 5.16 KB | drunken monkey |
| #5 | 3327383-5--content_access_view_unpublished--tests_only.patch | 2.32 KB | drunken monkey |
Issue fork search_api-3327383
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 #3
unstatu commentedI have created a MR with a possible solution.
Comment #4
drunken monkeyThanks a lot for suggesting this improvement!
You’re right, if this is part of Core we should support it. Especially if it’s really this easy.
However, this would still need some test coverage before it can be committed. Would you be willing to add a method for this to
ContentAccessTest?Also, unfortunately testing of issue forks doesn’t work in this project (see #3190024: Problem with test dependencies when testing issue forks), so please use patches instead.
Comment #5
drunken monkeyHere is the same patch with test coverage.
Comment #8
drunken monkeyMerged.
Thanks again!