Ajout de permissions sur le module Ticket

This commit is contained in:
2026-03-23 11:44:30 +00:00
parent 63fc600be6
commit eff0f6bcda
35 changed files with 486 additions and 68 deletions

View File

@@ -54,7 +54,7 @@ class UserGroup
/**
* @var Collection<int, User>&Selectable<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\ManyToMany(targetEntity: User::class, inversedBy: 'groupsAsMember')]
#[ORM\JoinTable(name: 'chill_main_user_group_user')]
private Collection&Selectable $users;
@@ -129,6 +129,7 @@ class UserGroup
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
$user->addGroupAsMember($this);
}
return $this;
@@ -138,6 +139,7 @@ class UserGroup
{
if ($this->users->contains($user)) {
$this->users->removeElement($user);
$user->removeGroupAsMember($this);
}
return $this;