You are here

protected function ResourceTestBase::grantPermissionsToAuthenticatedRole in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::grantPermissionsToAuthenticatedRole()
  2. 9 core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::grantPermissionsToAuthenticatedRole()

Grants permissions to the authenticated role.

Parameters

string[] $permissions: Permissions to grant.

File

core/modules/rest/tests/src/Functional/ResourceTestBase.php, line 304

Class

ResourceTestBase
Subclass this for every REST resource, every format and every auth provider.

Namespace

Drupal\Tests\rest\Functional

Code

protected function grantPermissionsToAuthenticatedRole(array $permissions) {
  $this
    ->grantPermissions(Role::load(RoleInterface::AUTHENTICATED_ID), $permissions);
}