Commit a2ab6eac authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1894840 by dcrocks, larowlan: Fixed regression - main menu not shown on front page.

parent e2941705
......@@ -29,7 +29,7 @@ class SystemMenuBlock extends BlockBase {
public function blockAccess() {
// @todo The 'Tools' menu should be available to anonymous users.
list($plugin, $derivative) = explode(':', $this->getPluginId());
return ($GLOBALS['user']->uid || in_array($derivative, array('menu-tools', 'menu-footer')));
return ($GLOBALS['user']->uid || in_array($derivative, array('menu-main', 'menu-tools', 'menu-footer')));
......@@ -32,6 +32,22 @@ function testStandard() {
// Test anonymous user can access 'Main navigation' block.
$admin = $this->drupalCreateUser(array('administer blocks'));
// Configure the block.
$this->drupalPost(NULL, array(
'region' => 'sidebar_first',
'machine_name' => 'main_navigation',
), t('Save block'));
// Verify admin user can see the block.
$this->assertText('Main navigation');
// Verify anonymous user can see the block.
$this->assertText('Main navigation');
Supports Markdown
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