mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Add access controls and permissions for signature steps
Implemented a Voter to enforce permissions on signature steps, ensuring only authorized users can sign steps. Updated relevant controllers and templates to reflect these permissions, and added corresponding tests to validate the changes.
This commit is contained in:
@@ -318,7 +318,7 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
}
|
||||
}
|
||||
|
||||
return $usersInvolved;
|
||||
return array_values($usersInvolved);
|
||||
}
|
||||
|
||||
public function getWorkflowName(): string
|
||||
@@ -446,6 +446,10 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
$newStep->addDestUser($user);
|
||||
}
|
||||
|
||||
if (null !== $transitionContextDTO->futureUserSignature) {
|
||||
$newStep->addDestUser($transitionContextDTO->futureUserSignature);
|
||||
}
|
||||
|
||||
foreach ($transitionContextDTO->futureDestEmails as $email) {
|
||||
$newStep->addDestEmail($email);
|
||||
}
|
||||
|
Reference in New Issue
Block a user