Skip to content

Commit

Permalink
Remove /admin/modules/update
Browse files Browse the repository at this point in the history
As most updates are controlled by DPL, this page doesn't really add
value. Make it inaccessible.

Ref DDFHER-94
  • Loading branch information
xendk committed Nov 20, 2024
1 parent f4fe44c commit 1884b67
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}

}

0 comments on commit 1884b67

Please sign in to comment.