diff --git a/src/Module/Integration/Infrastructure/ApiPlatform/Resource/BookStackShelf.php b/src/Module/Integration/Infrastructure/ApiPlatform/Resource/BookStackShelf.php index b7a2c0c..13115db 100644 --- a/src/Module/Integration/Infrastructure/ApiPlatform/Resource/BookStackShelf.php +++ b/src/Module/Integration/Infrastructure/ApiPlatform/Resource/BookStackShelf.php @@ -15,7 +15,9 @@ use Symfony\Component\Serializer\Attribute\Groups; uriTemplate: '/bookstack/shelves', normalizationContext: ['groups' => ['bookstack_shelf:read']], provider: BookStackShelfProvider::class, - security: "is_granted('ROLE_ADMIN')", + // Liste toutes les étagères visibles par le token BookStack global : + // réservé à qui configure un projet (ProjectDrawer), pas à tout user. + security: "is_granted('project-management.projects.manage')", ), ], )] diff --git a/src/Module/Integration/Infrastructure/ApiPlatform/Resource/GiteaRepository.php b/src/Module/Integration/Infrastructure/ApiPlatform/Resource/GiteaRepository.php index 2ea8636..f298509 100644 --- a/src/Module/Integration/Infrastructure/ApiPlatform/Resource/GiteaRepository.php +++ b/src/Module/Integration/Infrastructure/ApiPlatform/Resource/GiteaRepository.php @@ -15,7 +15,9 @@ use Symfony\Component\Serializer\Attribute\Groups; uriTemplate: '/gitea/repositories', normalizationContext: ['groups' => ['gitea_repo:read']], provider: GiteaRepositoryProvider::class, - security: "is_granted('ROLE_ADMIN')", + // Liste l'intégralité des dépôts visibles par le token Gitea global : + // réservé à qui configure un projet (ProjectDrawer), pas à tout user. + security: "is_granted('project-management.projects.manage')", ), ], )]