Commit 434498c3 authored by catch's avatar catch

Issue #849624 by brad.bulger, Stevel, oriol_e9g, Alan Evans: Fixed wrong...

Issue #849624 by brad.bulger, Stevel, oriol_e9g, Alan Evans: Fixed wrong permission for admin/structure/menu/parents.
parent 6c47d161
......@@ -660,6 +660,24 @@ function enableMenuLink($item) {
$this->assertMenuLink($mlid, array('hidden' => 0));
}
/**
* 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.
*/
......
......@@ -77,7 +77,7 @@ function menu_menu() {
'title' => 'Parent menu items',
'page callback' => 'menu_parent_options_js',
'type' => MENU_CALLBACK,
'access arguments' => array(TRUE),
'access arguments' => array('administer menu'),
);
$items['admin/structure/menu/list'] = array(
'title' => 'List menus',
......
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