-
Notifications
You must be signed in to change notification settings - Fork 6
Entity Query access control to decide if users can reference content. #319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.x
Are you sure you want to change the base?
Conversation
#216 (comment) Adds tests. I think they're failing, because I think they do get the content in the list.
|
What the tests are at least failing on is that users that don't have the permission to see the unpublished content also see it. |
|
@ekes ok, looking at that. I took away the editors view any unpublished content and checked again, whilst they can't see the unpublished landing page, it still appears in the list. |
|
I think the patch we may have added Users without 'bypass node access' permission can't reference unpublished content even if they have access to it might be causing a conflict with this. Maybe the safer option is to leave the existing code but add a check for hasPermission('view any unpublished content') alongside the checks for node acesss? |
|
Just noting that a similar fix was committed for menu items in Drupal 10.1 so whilst I don't know why |
…blished permission In the entity reference service selector. Restore previous node_access checking, and restrict to published nodes if the checks do not pass. Additionally, check if the user has permission view any unpublished content and allow access to unpublished nodes if that is the case.
e1f27f3 to
ef6e1db
Compare
…ionshipsUi Apply same limit to the widget used to find referenced child pages.
2ed8dc8 to
7023a20
Compare
|
@ekes I've tried to restore the previous logic and add the permission check for 'view any unpublished content' but that seems to have made the tests fail. From manually testing though it appears to be functional, with unpublished landing / service pages hidden if the user does not have any of the right access permissions. |





#216 (comment)
Adds tests. I think they're failing, because I think they do get the content in the list.
Pushing for work done. @andybroomfield