Skip to content

Commit

Permalink
#50 Prevents third-party services from being attached to admin pages
Browse files Browse the repository at this point in the history
  • Loading branch information
timurtripp committed Feb 21, 2024
1 parent 8bba0ae commit b04a25e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ucb_site_configuration.module
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function ucb_site_configuration_preprocess_page(array &$variables) {
function ucb_site_configuration_page_attachments(array &$variables) {
/** @var \Drupal\ucb_site_configuration\SiteConfiguration */
$service = \Drupal::service('ucb_site_configuration');
if (($node = \Drupal::routeMatch()->getParameter('node')) && $node instanceof NodeInterface) {
if (!\Drupal::service('router.admin_context')->isAdminRoute() && ($node = \Drupal::routeMatch()->getParameter('node')) && $node instanceof NodeInterface) {
$service->attachExternalServiceIncludes($variables, $node);
}
}
Expand Down

0 comments on commit b04a25e

Please sign in to comment.