diff --git a/core/modules/toolbar/src/Controller/ToolbarController.php b/core/modules/toolbar/src/Controller/ToolbarController.php index 11d17b4..7290160 100644 --- a/core/modules/toolbar/src/Controller/ToolbarController.php +++ b/core/modules/toolbar/src/Controller/ToolbarController.php @@ -10,7 +10,6 @@ use Drupal\Core\Access\AccessInterface; use Drupal\Core\Controller\ControllerBase; use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\HttpFoundation\Request; /** * Defines a controller for the toolbar module. @@ -33,8 +32,8 @@ public function subtreesJsonp() { /** * Checks access for the subtree controller. * - * @param \Symfony\Component\HttpFoundation\Request $request - * The current request. + * @param string $hash + * The hash of the toolbar subtrees. * @param string $langcode * The langcode of the requested site, NULL if none given. * @@ -42,8 +41,7 @@ public function subtreesJsonp() { * Returns AccessInterface::ALLOW when access was granted, otherwise * AccessInterface::DENY. */ - public function checkSubTreeAccess(Request $request, $langcode) { - $hash = $request->get('hash'); + public function checkSubTreeAccess($hash, $langcode) { return ($this->currentUser()->hasPermission('access toolbar') && ($hash == _toolbar_get_subtrees_hash($langcode))) ? AccessInterface::ALLOW : AccessInterface::DENY; }