You are here

public function Dummy::revokeGrants in Authorization 8

Revoke all previously applied and no longer valid grants.

Parameters

\Drupal\user\UserInterface $user: The user to act upon.

array $context: Grants applied during this procedure.

Overrides ConsumerInterface::revokeGrants

File

tests/modules/authorization_test/src/Plugin/authorization/Consumer/Dummy.php, line 28

Class

Dummy
Provides a consumer for Drupal roles.

Namespace

Drupal\authorization_test\Plugin\authorization\Consumer

Code

public function revokeGrants(UserInterface $user, array $context) : void {
  $user->revoked = $context;
}