summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2014-08-08 20:11:32 (GMT)
committerAlex Pott2014-08-08 20:11:32 (GMT)
commite1e0ab25ec2f0269754c1955cff45aecd8e09376 (patch)
tree339ff91f6fa9a4a0a9ebec798a3d459adf009846
parent960fedc540217470292741e9e0481dbd30193d68 (diff)
Issue #2316203 by olli, tim.plunkett | Charles Belov: Fixed Permission "Use the administration pages and help" grants permission to configure Image Toolkit.
-rw-r--r--core/modules/system/src/Tests/Image/ToolkitSetupFormTest.php7
-rw-r--r--core/modules/system/system.routing.yml2
2 files changed, 7 insertions, 2 deletions
diff --git a/core/modules/system/src/Tests/Image/ToolkitSetupFormTest.php b/core/modules/system/src/Tests/Image/ToolkitSetupFormTest.php
index 22b976d..a57c756 100644
--- a/core/modules/system/src/Tests/Image/ToolkitSetupFormTest.php
+++ b/core/modules/system/src/Tests/Image/ToolkitSetupFormTest.php
@@ -36,7 +36,7 @@ class ToolkitSetupFormTest extends WebTestBase {
public function setUp() {
parent::setUp();
$this->admin_user = $this->drupalCreateUser(array(
- 'access administration pages',
+ 'administer site configuration',
));
$this->drupalLogin($this->admin_user);
}
@@ -66,5 +66,10 @@ class ToolkitSetupFormTest extends WebTestBase {
$edit = array('test[test_parameter]' => '20');
$this->drupalPostForm(NULL, $edit, 'Save configuration');
$this->assertEqual(\Drupal::config('system.image.test_toolkit')->get('test_parameter'), '20');
+
+ // Test access without the permission 'administer site configuration'.
+ $this->drupalLogin($this->drupalCreateUser(array('access administration pages')));
+ $this->drupalGet('admin/config/media/image-toolkit');
+ $this->assertResponse(403);
}
}
diff --git a/core/modules/system/system.routing.yml b/core/modules/system/system.routing.yml
index f9343a9..ba2a46d 100644
--- a/core/modules/system/system.routing.yml
+++ b/core/modules/system/system.routing.yml
@@ -187,7 +187,7 @@ system.image_toolkit_settings:
_form: 'Drupal\system\Form\ImageToolkitForm'
_title: 'Image toolkit'
requirements:
- _permission: 'access administration pages'
+ _permission: 'administer site configuration'
system.site_maintenance_mode:
path: '/admin/config/development/maintenance'