function FieldConfigResourceTestBase::getExpectedUnauthorizedAccessMessage

Same name in other branches
  1. 9 core/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php \Drupal\Tests\field\Functional\Rest\FieldConfigResourceTestBase::getExpectedUnauthorizedAccessMessage()
  2. 10 core/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php \Drupal\Tests\field\Functional\Rest\FieldConfigResourceTestBase::getExpectedUnauthorizedAccessMessage()
  3. 11.x core/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php \Drupal\Tests\field\Functional\Rest\FieldConfigResourceTestBase::getExpectedUnauthorizedAccessMessage()

Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage

File

core/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php, line 111

Class

FieldConfigResourceTestBase

Namespace

Drupal\Tests\field\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
    if ($this->config('rest.settings')
        ->get('bc_entity_resource_permissions')) {
        return parent::getExpectedUnauthorizedAccessMessage($method);
    }
    return "The 'administer node fields' permission is required.";
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.