Closed (fixed)
Project:
Node View Permissions
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 May 2015 at 12:48 UTC
Updated:
30 Apr 2018 at 15:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
IcePhenom commentedBad comment
Comment #2
IcePhenom commentedBad comment
Comment #3
IcePhenom commentedThis patch fixes this
Comment #4
IcePhenom commentedComment #5
kiss.jozsef commentedAdded 'view any unpublished ' . $type . ' content' permission so it works with view unpublished module
Comment #6
ben.bunk commentedThe patch in comment #5 worked for me in the D7 version.
Comment #7
zlatev commentedI have created the same patch for workbench_moderation module. Maybe more general approach should be considered regarding this issues as all modules working with revisions will hit it.
Comment #8
adci_contributor commentedHi, guys!
Thanks for your big work.
Your patches partially correspond to the work of this module.
With any your patches I can get correct access to the node (published or unpublished) by direct link.
But if any node published on the front page, it doesn’t appear there.
I can’t add your patches to our code, but they can be used by someone if it fits they functionality.
Comment #9
adci_contributor commentedComment #10
adci_contributor commentedHello everyone!
We solved this problem in another way. All the changes you can already see in the dev-branch.
Comment #11
adci_contributor commentedComment #13
lemuelsantos commentedI believe this is still an issue for version 8.x-1.2 and 8.x-1.x-dev the approach to ignore unpublished node at
hook_node_access_recordshas side effects on the admin/content view and generate conflicts with core and workbench module that for the "view own/any unpublished content" permissions.The issue is because on
hook_node_access_recordsunpublished nodes are skipped buthook_node_grantsis ALSO called for unpublished nodes and there WON'T be any grants for unpublished nodes which results the unpublished nodes not appear in the admin/content if the users don't have the "bypass content access control". This will also happen in any other view that is not "disabling SQL rewriting" (disable node access checks).I believe that approach must be reviewed in order to add grants for unpublished nodes and allow users with "view any unpublished content", "view own unpublished content" (workbench) or even "edit any [content type] content" permissions.
My workaround for now is adding a grant for "edit any [content type] content" and allow users with that permission view/update the node.
Please let me know your thoughts... thanks...