summaryrefslogtreecommitdiffstats
path: root/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php')
-rw-r--r--core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
index d0fbb8c..44ea1e0 100644
--- a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
+++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
@@ -661,6 +661,24 @@ class MenuTest extends MenuWebTestBase {
}
/**
+ * Test administrative users other than user 1 can access the menu parents AJAX callback.
+ */
+ public function testMenuParentsJsAccess() {
+
+ $admin = $this->drupalCreateUser(array('administer menu'));
+ $this->drupalLogin($admin);
+ // Just check access to the callback overall, the POST data is irrelevant.
+ $this->drupalGetAJAX('admin/structure/menu/parents');
+ $this->assertResponse(200);
+
+ // Do standard user tests.
+ // Login the user.
+ $this->drupalLogin($this->std_user);
+ $this->drupalGetAJAX('admin/structure/menu/parents');
+ $this->assertResponse(403);
+ }
+
+ /**
* Get standard menu link.
*/
private function getStandardMenuLink() {