function ShortcutResourceTestBase::getExpectedUnauthorizedAccessMessage
Same name in other branches
- 9 core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 8.9.x core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 11.x core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutResourceTestBase::getExpectedUnauthorizedAccessMessage()
Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage
File
-
core/
modules/ shortcut/ tests/ src/ Functional/ Rest/ ShortcutResourceTestBase.php, line 153
Class
- ShortcutResourceTestBase
- ResourceTestBase for Shortcut entity.
Namespace
Drupal\Tests\shortcut\Functional\RestCode
protected function getExpectedUnauthorizedAccessMessage($method) {
switch ($method) {
case 'GET':
case 'POST':
case 'PATCH':
case 'DELETE':
return "The shortcut set must be the currently displayed set for the user and the user must have 'access shortcuts' AND 'customize shortcut links' permissions.";
default:
return parent::getExpectedUnauthorizedAccessMessage($method);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.