Problem/Motivation
Getting error while adding node/taxonomy in Drupal 10.
Entity queries must explicitly set whether the query should be access checked or not.
Steps to reproduce
- install and configure the module
- add allow only field in content type/taxonomy
- Try to create a node/term
Proposed resolution
use access check in query.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3358123-explicit-access-check.patch | 809 bytes | edmund.dunn |
| #4 | 3358123-fix-passive-accessCheck-call.patch | 769 bytes | tsquared212 |
Issue fork allow_only_one-3358123
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
omkar_yewale commented!2 MR Created, Please Review.
Comment #4
tsquared212 commentedSubmitting simple patch that fixes reliance on deprecated default access check. Might be useful for those who need the changes before the @omkar_yewale PR is merged.
Comment #5
swirtI think we want to intentionally set the access check to FALSE. This module is intentionally looking for things that have duplicated a unique pattern. It would be a problem if it did not find a duplicate, simply because the user did not have access to that content.
Comment #7
bharath-kondeti commentedComment #8
swirtThankyou @bharath for this change. I will test this out soon.
Comment #9
edmund.dunn commentedPosting the static patch because using the MR doesn't allow pinning to a specific commit, so anyone can submit pretty much anything and inject it into our codebase IIRC. This also fixed our issue.
Comment #11
swirtComment #12
swirtThank you all for your contributions on this. It is going out with 1.0.2
https://www.drupal.org/project/allow_only_one/releases/1.0.2
Comment #13
swirtComment #14
swirtComment #15
swirt