function FileResourceTestBase::getExpectedUnauthorizedAccessMessage
Same name in other branches
- 9 core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php \Drupal\Tests\file\Functional\Rest\FileResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 8.9.x core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php \Drupal\Tests\file\Functional\Rest\FileResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 11.x core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php \Drupal\Tests\file\Functional\Rest\FileResourceTestBase::getExpectedUnauthorizedAccessMessage()
Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage
File
-
core/
modules/ file/ tests/ src/ Functional/ Rest/ FileResourceTestBase.php, line 220
Class
Namespace
Drupal\Tests\file\Functional\RestCode
protected function getExpectedUnauthorizedAccessMessage($method) {
return match ($method) { 'GET' => "The 'access content' permission is required.",
'PATCH' => "Only the file owner can update the file entity.",
'DELETE' => "The 'delete any file' permission is required.",
default => parent::getExpectedUnauthorizedAccessMessage($method),
};
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.