function WorkspaceResourceTestBase::getExpectedUnauthorizedAccessMessage
Same name in other branches
- 9 core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php \Drupal\Tests\workspaces\Functional\EntityResource\WorkspaceResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 10 core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php \Drupal\Tests\workspaces\Functional\EntityResource\WorkspaceResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 11.x core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php \Drupal\Tests\workspaces\Functional\EntityResource\WorkspaceResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 11.x core/modules/workspaces/tests/src/Functional/Rest/WorkspaceResourceTestBase.php \Drupal\Tests\workspaces\Functional\Rest\WorkspaceResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 10 core/modules/workspaces/tests/src/Functional/Rest/WorkspaceResourceTestBase.php \Drupal\Tests\workspaces\Functional\Rest\WorkspaceResourceTestBase::getExpectedUnauthorizedAccessMessage()
Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage
File
-
core/
modules/ workspaces/ tests/ src/ Functional/ EntityResource/ WorkspaceResourceTestBase.php, line 178
Class
- WorkspaceResourceTestBase
- Base class for workspace EntityResource tests.
Namespace
Drupal\Tests\workspaces\Functional\EntityResourceCode
protected function getExpectedUnauthorizedAccessMessage($method) {
if ($this->config('rest.settings')
->get('bc_entity_resource_permissions')) {
return parent::getExpectedUnauthorizedAccessMessage($method);
}
switch ($method) {
case 'GET':
return "The 'view any workspace' permission is required.";
case 'POST':
return "The 'create workspace' permission is required.";
case 'PATCH':
return "The 'edit any workspace' permission is required.";
case 'DELETE':
return "The 'delete any workspace' permission is required.";
}
return parent::getExpectedUnauthorizedAccessMessage($method);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.