Guides
Tutorials
Checks if the logged user has sufficient permissions to access the given resource.
class ApiPlatform\Symfony\Security\ResourceAccessChecker implements `<a href="/docs/reference/Symfony/Security/ResourceAccessCheckerInterface">ApiPlatform\Symfony\Security\ResourceAccessCheckerInterface</a>`
{
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
}class ApiPlatform\Symfony\Security\ResourceAccessChecker implements `<a href="/docs/reference/Symfony/Security/ResourceAccessCheckerInterface">ApiPlatform\Symfony\Security\ResourceAccessCheckerInterface</a>`
{
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)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): boolpublic isGranted(string $resourceClass, string $expression, array $extraVariables): bool| resourceClass | string | |
| expression | string | |
| extraVariables | array |
bool