feat(core) : expose role and user-rbac api endpoints with processors

This commit is contained in:
Matthieu
2026-06-19 17:16:38 +02:00
parent 5060fb689b
commit 48c67a5fb9
6 changed files with 265 additions and 5 deletions
+6 -2
View File
@@ -17,7 +17,8 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use InvalidArgumentException;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Serializer\Attribute\SerializedName;
#[ORM\Entity(repositoryClass: DoctrineRoleRepository::class)]
#[ORM\Table(name: '`role`')]
@@ -54,7 +55,6 @@ class Role
private ?string $description;
#[ORM\Column(name: 'is_system', options: ['comment' => 'True for built-in roles that cannot be deleted'])]
#[Groups(['role:read'])]
private bool $isSystem;
/**
@@ -111,6 +111,10 @@ class Role
$this->description = $description;
}
// PropertyInfo strips the `is` prefix and would expose this field as `system`.
// An explicit SerializedName guarantees the `isSystem` key expected by API clients.
#[Groups(['role:read'])]
#[SerializedName('isSystem')]
public function isSystem(): bool
{
return $this->isSystem;