Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit 690b2bf

Browse files
Used correct cache contexts for menu access check result. (#59)
* Used correct cache contexts for menu access check result. * Remove reference to specific dev-tools commmit Co-authored-by: anthony-malkoun <[email protected]>
1 parent c78d6ab commit 690b2bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dev-tools.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
# stable version.
3434
#
3535
# Uncomment and set the Dev-Tools's commit value and commit this change.
36-
export GH_COMMIT=a06d079ad232a38cf4cc39feaa4dd8f1df3fe9e2
36+
# export GH_COMMIT=COMMIT_SHA
3737

3838
bash <(curl -L https://raw.githubusercontent.com/dpc-sdp/dev-tools/master/install?"$(date +%s)") "$@"

tide_api.module

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function tide_api_entity_access(EntityInterface $entity, $operation, AccountInte
1818
if ($entity->getEntityTypeId() == 'menu' || $entity->getEntityTypeId() == 'menu_link_content') {
1919
if ($operation == 'view') {
2020
if (Routes::isJsonApiRequest(\Drupal::request()->attributes->all())) {
21-
return AccessResult::allowed()->cachePerUser();
21+
return AccessResult::allowed()->addCacheableDependency($entity);
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)