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/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
}

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)
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
public isGranted(string $resourceClass, string $expression, array $extraVariables): bool

Parameters

resourceClassstring
expressionstring
extraVariablesarray

Returns

bool

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop