From 0e1d233d7973245209b4d737e000932077259716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 10 Feb 2026 15:05:49 +0000 Subject: [PATCH] Take workflow creator into account when granting edit permissions on documents --- .changes/unreleased/Fixed-20260210-155209.yaml | 6 ++++++ .../ChillMainBundle/Entity/Workflow/EntityWorkflow.php | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 .changes/unreleased/Fixed-20260210-155209.yaml diff --git a/.changes/unreleased/Fixed-20260210-155209.yaml b/.changes/unreleased/Fixed-20260210-155209.yaml new file mode 100644 index 000000000..9cd6c9cb1 --- /dev/null +++ b/.changes/unreleased/Fixed-20260210-155209.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: For giving edit permissions on documents, take into account the workflow creator +time: 2026-02-10T15:52:09.785649121+01:00 +custom: + Issue: "498" + SchemaChange: No schema change diff --git a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php index ad5fa9e95..914a71615 100644 --- a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php +++ b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php @@ -394,6 +394,10 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface public function isUserInvolved(User $user): bool { + if ($this->getCreatedBy() === $user) { + return true; + } + foreach ($this->getSteps() as $step) { if ($step->getAllDestUser()->contains($user)) { return true;