Add reject functionality for workflow signatures

Implemented the ability to reject workflow signatures by adding necessary templates, routes, and authorization checks. Updated the `WorkflowSignatureCancelController` to handle rejection and modified existing templates and translations to support the new feature.
This commit is contained in:
2024-09-25 11:31:27 +02:00
parent 83121c2a83
commit cfce531754
7 changed files with 86 additions and 17 deletions

View File

@@ -22,10 +22,12 @@ final class EntityWorkflowStepSignatureVoter extends Voter
public const CANCEL = 'CHILL_MAIN_ENTITY_WORKFLOW_SIGNATURE_CANCEL';
public const REJECT = 'CHILL_MAIN_ENTITY_WORKFLOW_SIGNATURE_REJECT';
protected function supports(string $attribute, $subject)
{
return $subject instanceof EntityWorkflowStepSignature
&& in_array($attribute, [self::SIGN, self::CANCEL], true);
&& in_array($attribute, [self::SIGN, self::CANCEL, self::REJECT], true);
}
protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token)