function AlwaysAltersAccessPolicy::alterPermissions

Same name in other branches
  1. 10 core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php \Drupal\Tests\Core\Session\AlwaysAltersAccessPolicy::alterPermissions()

Overrides AccessPolicyBase::alterPermissions

File

core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php, line 526

Class

AlwaysAltersAccessPolicy

Namespace

Drupal\Tests\Core\Session

Code

public function alterPermissions(AccountInterface $account, string $scope, RefinableCalculatedPermissionsInterface $calculated_permissions) : void {
    parent::alterPermissions($account, $scope, $calculated_permissions);
    $calculated_permissions->addItem(new CalculatedPermissionsItem([
        'always',
    ], FALSE, 'always', 2));
}

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