-
Notifications
You must be signed in to change notification settings - Fork 5
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
PER-26: Rework querying. #31
Conversation
Should reduce the number of joins when dealing with various multiple file and media fields in the same query, as it instead builds out a disjuction in the "join" condition against the LUT.
Track things as metadata on the query?
See: #6 (review) Some mixed up assertions, assuming that the ::setUp() method changed at some point mid-implementation, and wasn't carried through? And that it that the existing implementation was indeed bearing a bug.
... DRY-ing up in progress, with the trait.
with: | ||
composer_patches: |- | ||
{ | ||
"discoverygarden/islandora_hierarchical_access": { | ||
"dependent work from dependency": "https://github.com/discoverygarden/islandora_hierarchical_access/pull/19.patch" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be dropped when discoverygarden/islandora_hierarchical_access#19 is merged (and released).
... could possibly bump our composer.json
according to the new release of islandora_hierarchical_access
?
with: | |
composer_patches: |- | |
{ | |
"discoverygarden/islandora_hierarchical_access": { | |
"dependent work from dependency": "https://github.com/discoverygarden/islandora_hierarchical_access/pull/19.patch" | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in discoverygarden/islandora_hierarchical_access#19 revealed some bad assertions in here, where we were expecting more files then should be available: #6 (review)
Better than being left thinking there's a bug where we have undocumentedly expected there to be a file to exist that we didn't explicitly create in our `::setUp()`.
Bit of formatting, and using constants.
Other embargoes block access (but exemptions from _any_ are let through).
/** | ||
* Implements hook_query_TAG_alter() for `media_access` tagged queries. | ||
*/ | ||
function embargo_query_media_access_alter(AlterableInterface $query) { | ||
/** @var \Drupal\embargo\Access\QueryTagger $tagger */ | ||
$tagger = \Drupal::service('embargo.query_tagger'); | ||
$tagger->tagAccess($query, 'media'); | ||
} | ||
|
||
/** | ||
* Implements hook_query_TAG_alter() for `file_access` tagged queries. | ||
*/ | ||
function embargo_query_file_access_alter(AlterableInterface $query) { | ||
/** @var \Drupal\embargo\Access\QueryTagger $tagger */ | ||
$tagger = \Drupal::service('embargo.query_tagger'); | ||
$tagger->tagAccess($query, 'file'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
media
and file
are now handled via the event.
PER-26: Merging in latest from main to resolve merge conflicts
Dependent on discoverygarden/islandora_hierarchical_access#19