Created
July 2, 2021 16:51
-
-
Save imcbride/4dbf34ba841da5dd88e8439654c00cd4 to your computer and use it in GitHub Desktop.
tvi-views-access.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Service/TaxonomyViewsIntegratorManager.php b/src/Service/TaxonomyViewsIntegratorManager.php | |
index 23f6dd9..fd2f47e 100644 | |
--- a/src/Service/TaxonomyViewsIntegratorManager.php | |
+++ b/src/Service/TaxonomyViewsIntegratorManager.php | |
@@ -153,6 +153,13 @@ class TaxonomyViewsIntegratorManager implements TaxonomyViewsIntegratorManagerIn | |
->view($taxonomy_term, 'full'); | |
} | |
+ // @todo: Access-control, is it worth addressing? | |
+ if (!$build['#view'] || !$build['#view']->access($build['#view']->current_display)) { | |
+ // here we return a 403 | |
+ // you might advise to use views_embed_view | |
+ throw new AccessDeniedHttpException(); | |
+ } | |
+ | |
return $build; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment