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
}
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)
expressionLanguage | Symfony\Component\ExpressionLanguage\ExpressionLanguage | |
authenticationTrustResolver | Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface | |
roleHierarchy | Symfony\Component\Security\Core\Role\RoleHierarchyInterface | |
tokenStorage | Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface | |
authorizationChecker | Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface |
public isGranted(string $resourceClass, string $expression, array $extraVariables): bool
resourceClass | string | |
expression | string | |
extraVariables | array |
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