function ShortcutSetResourceTestBase::getExpectedUnauthorizedAccessMessage
Same name in other branches
- 9 core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutSetResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 10 core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutSetResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 11.x core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutSetResourceTestBase::getExpectedUnauthorizedAccessMessage()
Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage
File
-
core/
modules/ shortcut/ tests/ src/ Functional/ Rest/ ShortcutSetResourceTestBase.php, line 91
Class
- ShortcutSetResourceTestBase
- ResourceTestBase for ShortcutSet entity.
Namespace
Drupal\Tests\shortcut\Functional\RestCode
protected function getExpectedUnauthorizedAccessMessage($method) {
if ($this->config('rest.settings')
->get('bc_entity_resource_permissions')) {
return parent::getExpectedUnauthorizedAccessMessage($method);
}
switch ($method) {
case 'GET':
return "The 'access shortcuts' permission is required.";
default:
return parent::getExpectedUnauthorizedAccessMessage($method);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.