mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-02-26 10:10:02 +00:00
Resolve "Téléchargement des documents d'un workflow: limiter à 30 téléchargements plutôt que 100"
This commit is contained in:
@@ -62,15 +62,15 @@ final readonly class WorkflowViewSendPublicController
|
||||
);
|
||||
}
|
||||
|
||||
if (100 < $workflowSend->getViews()->count()) {
|
||||
$this->chillLogger->info(self::LOG_PREFIX.'100 view reached, not allowed to see it again');
|
||||
throw new AccessDeniedHttpException('100 views reached, not allowed to see it again');
|
||||
if (30 < $workflowSend->getViews()->count()) {
|
||||
$this->chillLogger->info(self::LOG_PREFIX.'30 view reached, not allowed to see it again');
|
||||
throw new AccessDeniedHttpException('30 views reached, not allowed to see it again');
|
||||
}
|
||||
|
||||
try {
|
||||
$metadata = new EntityWorkflowViewMetadataDTO(
|
||||
$workflowSend->getViews()->count(),
|
||||
100 - $workflowSend->getViews()->count(),
|
||||
30 - $workflowSend->getViews()->count(),
|
||||
);
|
||||
$response = new Response(
|
||||
$this->entityWorkflowManager->renderPublicView($workflowSend, $metadata),
|
||||
|
||||
Reference in New Issue
Block a user