mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-02-11 02:45:31 +00:00
Merge branch '498-fix-workflow-initiator' into 'master'
Take workflow creator into account when granting edit permissions on documents Closes #498 See merge request Chill-Projet/chill-bundles!959
This commit is contained in:
6
.changes/unreleased/Fixed-20260210-155209.yaml
Normal file
6
.changes/unreleased/Fixed-20260210-155209.yaml
Normal file
@@ -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
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user