Commit 4fe6358e authored by webchick's avatar webchick

Issue #2187991 by jessebeach, dawehner: Toolbar access checking points to wrong namespace.

parent 0d70b8be
......@@ -440,6 +440,19 @@ function testLocaleTranslationSubtreesHashCacheClear() {
$this->assertNotEqual($original_subtree_hash, $new_subtree_hash, 'The user-specific subtree menu hash has been updated.');
}
/**
* Tests that the 'toolbar/subtrees/{hash}' is reachable.
*/
function testSubtreesJsonRequest() {
$admin_user = $this->admin_user;
$this->drupalLogin($admin_user);
// Request a new page to refresh the drupalSettings object.
$subtrees_hash = $this->getSubtreesHash();
$this->drupalGetJSON('toolbar/subtrees/' . $subtrees_hash);
$this->assertResponse('200');
}
/**
* Get the hash value from the admin menu subtrees route path.
*
......
......@@ -3,4 +3,4 @@ toolbar.subtrees:
defaults:
_controller: '\Drupal\toolbar\Controller\ToolbarController::subtreesJsonp'
requirements:
_custom_access: '\Drupal\toolbar\Routing\ToolbarController::checkSubTreeAccess'
_custom_access: '\Drupal\toolbar\Controller\ToolbarController::checkSubTreeAccess'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment