Commit b2e414ec authored by gbyte.co's avatar gbyte.co

Issue #2695623 by Q2U2: Anonymous user is allowed to configure SXS settings.

parent 9c6bfc40
...@@ -21,6 +21,10 @@ function simple_sitemap_help($route_name, \Drupal\Core\Routing\RouteMatchInterfa ...@@ -21,6 +21,10 @@ function simple_sitemap_help($route_name, \Drupal\Core\Routing\RouteMatchInterfa
*/ */
function simple_sitemap_form_alter(&$form, $form_state, $form_id) { function simple_sitemap_form_alter(&$form, $form_state, $form_id) {
// Do not alter the form if user lacks certain permissions.
if (!\Drupal::currentUser()->hasPermission('administer sitemap settings'))
return;
$f = new Form($form, $form_state, $form_id); $f = new Form($form, $form_state, $form_id);
// Do not alter the form if it is irrelevant to sitemap generation. // Do not alter the form if it is irrelevant to sitemap generation.
......
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