Drupal core's entity reference selection plugin for nodes only allows referencing unpublished nodes if the logged in user has the "bypass node access" permission. This is a very powerful permission that you may not want to give to your editors. This module provides an alternate entity reference selection plugin that does not require that permission for referencing unpublished nodes.
I am looking to have this module reviewed as being that the main purpose is to show unpublished data to users, it leaves a window of possible vulnerability.
Project link
https://www.drupal.org/project/entity_reference_unpublished
git clone --branch 8.x-1.x https://git.drupal.org/project/entity_reference_unpublished.git
Comments
Comment #2
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpsgitdrupalorgprojectentity_reference_unp...
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
lahoosascoots commentedUpdated code to fix all issues found by pareview.
Comment #4
rwohlebThis module doesn't seem to currently do anything. The EntityReferenceSelection plugin is basically empty. This seems to have been submitted too early? Am I missing something?
Comment #5
lahoosascoots commentedHi. If you compare this class with it’s parent you’ll see the difference.
Comment #6
avpadernoI tested it on simplytest.me and I can confirm the module works as described. The important step is setting the reference method of the node reference field to Unpublished Default, or the node reference field would use the default reference method Drupal core has.
Comment #7
avpadernoI would rather implement a new permission that allows just to link unpublished nodes. There must be a reason for Drupal not to shown all the unpublished nodes to any user.
I don't have any reason to think it's a security breach, though. It is clearly not the same as allowing any user to get a list of usernames.
I am going to approve the application in the next hours.
Comment #8
avpadernoThank you for your contribution!
I am going to update your account so you can opt into security advisory coverage now.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.