Do not block transition in EntityWorkflow when the user is member of a dest user group

- refactor EntityWorkflowGuardTransition + tests
- allow to find easily user within userGroup by adding a dedicated method to UserGroup::contains
This commit is contained in:
2024-09-26 16:04:53 +02:00
parent 17f4c85fa5
commit 86ec6f82da
4 changed files with 44 additions and 1 deletions

View File

@@ -141,4 +141,9 @@ class UserGroup
{
return true;
}
public function contains(User $user): bool
{
return $this->users->contains($user);
}
}