Query access handler

Created on 22 September 2020, over 4 years ago
Updated 24 January 2024, over 1 year ago

Problem/Motivation

Was just doing some research into advanced entity permissions such as "view all logs that are done"

I first came across this issue: https://www.drupal.org/project/drupal/issues/777578 ✨ Add an entity query access API and deprecate hook_query_ENTITY_TYPE_access_alter() Needs work
...but that issue seems to recommend using the entity contrib module's query_access handler: https://www.drupal.org/node/3002038 β†’

So I dropped the default "query_access" = "\Drupal\entity\QueryAccess\UncacheableQueryAccessHandler" handler in to test. Made a custom view that displays all logs. With the "view own observation log" permission, you can truly only view your own observation logs! Without the query_access handler I can see all other logs, but the "View log" link is not generated.

I'm curious if that default query_access handler would be a good addition to the core Log module? Are there any considerations before adding that? Seems like the only permissions affecting this would be granular permissions such as "view {own/all} {bundle} log". And could it perhaps be considered a bug if you can "view" logs that don't have permission to?

✨ Feature request
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States paul121 Spokane, WA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024