mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user