Commit 2d02ae69 authored by andrei.dincu's avatar andrei.dincu
Browse files

Issue #2249723 by andrei.dincu: Added more permissions for admin user in XmlSitemapFunctionalTest

parent c1155014
......@@ -25,7 +25,7 @@ class XmlSitemapFunctionalTest extends XmlSitemapTestBase {
public function setUp() {
parent::setUp();
$this->admin_user = $this->drupalCreateUser(array('access content', 'administer site configuration', 'administer xmlsitemap'));
$this->admin_user = $this->drupalCreateUser(array('access content', 'administer site configuration', 'administer xmlsitemap', 'access administration pages', 'access site reports'));
}
/**
......
......@@ -123,7 +123,7 @@ function xmlsitemap_requirements($phase) {
'value' => $generated_last ? $t('Last attempted generation on !date (!interval ago).', array('!date' => format_date($generated_last, 'small'), '!interval' => format_interval($generated_ago))) : $t('Cached files have not been generated yet.'),
'severity' => REQUIREMENT_OK,
);
if (\Drupal::config('xmlsitemap.settings')->get('rebuild_needed') && _xmlsitemap_rebuild_form_access()) {
if (\Drupal::config('xmlsitemap.settings')->get('rebuild_needed')) {
$requirements['xmlsitemap_generated']['severity'] = REQUIREMENT_ERROR;
$requirements['xmlsitemap_generated']['description'] = $t('The XML sitemap data is out of sync and needs to be <a href="@link-rebuild">completely rebuilt<a>.', array('@link-rebuild' => url('admin/config/search/xmlsitemap/rebuild')));
}
......
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