References ResourceAccessChecker
Reference
C
Class

ApiPlatform\Symfony\Security\ResourceAccessChecker

Checks if the logged user has sufficient permissions to access the given resource.

class ApiPlatform\Symfony\Security\ResourceAccessChecker implements , `<a href="/docs/main/references/Metadata/ResourceAccessCheckerInterface">ApiPlatform\Metadata\ResourceAccessCheckerInterface
{
    public __construct(null|Symfony\Component\ExpressionLanguage\ExpressionLanguage $expressionLanguage, null|Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface $authenticationTrustResolver, null|Symfony\Component\Security\Core\Role\RoleHierarchyInterface $roleHierarchy, null|Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage, null|Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker)
    public isGranted(string $resourceClass, string $expression, array $extraVariables): bool
}

Methods

__construct

public __construct(null|Symfony\Component\ExpressionLanguage\ExpressionLanguage $expressionLanguage, null|Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface $authenticationTrustResolver, null|Symfony\Component\Security\Core\Role\RoleHierarchyInterface $roleHierarchy, null|Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage, null|Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker)

Parameters

expressionLanguageSymfony\Component\ExpressionLanguage\ExpressionLanguage
authenticationTrustResolverSymfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface
roleHierarchySymfony\Component\Security\Core\Role\RoleHierarchyInterface
tokenStorageSymfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
authorizationCheckerSymfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface

isGranted

public isGranted(string $resourceClass, string $expression, array $extraVariables): bool

Parameters

resourceClassstring
expressionstring
extraVariablesarray

Returns

bool

Made with love by

Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.

Learn more

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop