- GiteaBranch, GiteaBranchName, GiteaPullRequest: require ROLE_USER - All 22 MCP tools: require ROLE_USER (ROLE_ADMIN for users/clients listing) Tickets: T-002, T-007 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
643 B
PHP
27 lines
643 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\ApiResource;
|
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use ApiPlatform\Metadata\Get;
|
|
use App\State\GiteaBranchNameProvider;
|
|
use Symfony\Component\Serializer\Attribute\Groups;
|
|
|
|
#[ApiResource(
|
|
operations: [
|
|
new Get(
|
|
uriTemplate: '/tasks/{taskId}/gitea/branch-name/{type}',
|
|
normalizationContext: ['groups' => ['gitea_branch_name:read']],
|
|
provider: GiteaBranchNameProvider::class,
|
|
security: "is_granted('ROLE_USER')",
|
|
),
|
|
],
|
|
)]
|
|
final class GiteaBranchName
|
|
{
|
|
#[Groups(['gitea_branch_name:read'])]
|
|
public string $name = '';
|
|
}
|