diff --git a/web/modules/custom/dpl_webmaster/src/Routing/RouteSubscriber.php b/web/modules/custom/dpl_webmaster/src/Routing/RouteSubscriber.php index 53c3e0c65..140100b4e 100644 --- a/web/modules/custom/dpl_webmaster/src/Routing/RouteSubscriber.php +++ b/web/modules/custom/dpl_webmaster/src/Routing/RouteSubscriber.php @@ -21,6 +21,14 @@ protected function alterRoutes(RouteCollection $collection): void { if ($route = $collection->get('update.module_install')) { $route->setRequirement('_access', 'FALSE'); } + + // Remove /admin/modules/update. It won't work for the majority of the + // listed modules (webmasters can't update contrib modules provided by DPL + // anyway). Limiting it to webmaster uploaded, Drupal contrib modules would + // be a nicer alternative, but currently out of scope. + if ($route = $collection->get('update.module_update')) { + $route->setRequirement('_access', 'FALSE'); + } } }