public function __construct( private readonly DefinitionInstanceRegistry
$definitionInstanceRegistry,
private readonly EventDispatcherInterface
$eventDispatcher,
private readonly RouterInterface
$router ) { } #[Route(path: '/api/_action/acl/privileges', name: 'api.acl.privileges.get', methods: ['GET'], defaults: ['auth_required' => true, '_acl' => ['api_acl_privileges_get']])]
public function getPrivileges(): JsonResponse
{ $privileges =
$this->
getFromRoutes();
$privileges =
array_unique([...
$privileges, ...
$this->
getFromDefinitions()]);
return new JsonResponse($privileges);
} #[Route(path: '/api/_action/acl/additional_privileges', name: 'api.acl.privileges.additional.get', methods: ['GET'], defaults: ['auth_required' => true, '_acl' => ['api_acl_privileges_additional_get']])]
public function getAdditionalPrivileges(Context
$context): JsonResponse
{ $privileges =
$this->
getFromRoutes();