Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow-up for #1801304: Add Entity reference field
Currently we check only node_access()
Comment | File | Size | Author |
---|---|---|---|
#11 | 1847600-11.patch | 1.92 KB | amateescu |
#1 | 1847600.patch | 1.68 KB | amateescu |
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedThis change is really small, but unfortunately postponed on #1862750: Implement entity access API for nodes.
Comment #2
BerdirNot related to this but MENU_ACCESS_DENIED does not exist anymore this should throw an AccessDeniedException().
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedComment #4
amateescu CreditAttribution: amateescu commentedThe node access patch has been committed, now should be a good time to do this.
Comment #5
Berdir#1: 1847600.patch queued for re-testing.
Comment #6
BerdirTagging.
Comment #7
amateescu CreditAttribution: amateescu commentedThat's being fixed in #1801356: Entity reference autocomplete using routes.
Other than that, this patch is a no-brainer.. RTBC anyone? :)
Comment #8
Berdircomments have not been converted to entity access API, so they would get broken by this, in case someone would attempt to do something that crazy ;)
Also, if that other issue fixes that, it will conflict with this change. Will RTBC once that one is in and this re-rolled.
Comment #9
Berdir#1: 1847600.patch queued for re-testing.
Comment #11
amateescu CreditAttribution: amateescu commentedRerolled.
Comment #12
BerdirYes, patch context looks better now :)
With the current code, the access defaults to TRUE if they are not nodes. The default entity access controller however defaults to FALSE.
This means that references to entity types that do not provide an entity access controller will no longer work. Which right now in core means comments and files.
That might or might not block this from being committed right now, but the code changes here are fine and will not require additional changes, so setting to RTBC.
Comment #13
webchickWell, that seems simple enough.
Committed and pushed to 8.x. Thanks!