11631 Commits

Author SHA1 Message Date
45323e9136
Merge remote-tracking branch 'origin/upgrade-sf5' into signature-app-master 2024-09-16 11:51:33 +02:00
9f1afb8423
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.
2024-09-13 17:04:57 +02:00
1494c7ecd7 Merge branch 'signature-app/add-manual-zone' into 'signature-app-master'
Improve signature app

See merge request Chill-Projet/chill-bundles!725
2024-09-13 14:23:44 +00:00
911dfc2878
fix rector errors 2024-09-13 16:22:09 +02:00
8e984f2006
do not allow to sign if the signature is already applyied 2024-09-13 16:16:42 +02:00
f0e8df38af
remove the left-arrow on the "retour" button, because it was placed on the right of the page 2024-09-13 16:03:06 +02:00
1c0d334b91
downgrade symfony/event-dispatcher-contracts to version 2.4
This is necessary for using some dependencies which only works with symfony 5.4
v3.1.0
2024-09-12 17:34:28 +02:00
nobohan
59c34dabd7 Signature: allow for null index in signature zone 2024-09-12 17:18:13 +02:00
nobohan
119668e415 Signature: allow for null index in signature zone 2024-09-12 17:02:45 +02:00
nobohan
2b516629f6 Signature: refresh document after signature 2024-09-12 17:02:08 +02:00
nobohan
092b5c4f90 Signature: get the stored object back in the check signature API 2024-09-12 15:26:03 +02:00
nobohan
ae1459cf77 Signature: topbar UI 2024-09-12 14:22:58 +02:00
nobohan
57d2929ecd Signature: move buttons to a top toolbar + change behavior on a new zone 2024-09-12 14:03:43 +02:00
bc34d84d63
Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-09-12 13:36:50 +02:00
f0f651edea
update cs after php-cs-fixer upgrade 2024-09-12 12:02:33 +02:00
nobohan
3c987e0b8d Signature: keep selected zone when turning pages 2024-09-12 11:31:31 +02:00
f8a986d59b
Add user IP and authenticated user details to signature
Updated the SignatureRequest metadata to include the requester's IP address and currently authenticated user details. Also improved the rendering of signer information by leveraging the `ChillEntityRenderManagerInterface`.
2024-09-12 11:18:35 +02:00
09563979a2
Refactor entity rendering with manager pattern
Introduce ChillEntityRenderManager to centralize entity rendering logic, reducing redundancy and improving code organization. Update dependencies and service configuration to support the new manager pattern, enhancing maintainability and flexibility of entity rendering in templates.
2024-09-12 11:18:35 +02:00
nobohan
0ee91800ab Merge branch 'signature-app/add-manual-zone' of https://gitlab.com/Chill-Projet/chill-bundles into signature-app/add-manual-zone 2024-09-12 10:46:52 +02:00
nobohan
d08212df46
Signature: add and process returnPath in the signature app 2024-09-12 09:46:14 +02:00
nobohan
4933238f3f
Signature - improve UI signature app 2024-09-12 09:46:14 +02:00
nobohan
c23568032c
Signature: add a signature zone manually 2024-09-12 09:46:13 +02:00
18af2ca70b
Handle null transitionBy and improve display logic
Added checks for null transitionBy cases in workflow templates to display "Automated transition" when applicable. Also improved conditional rendering for 'destUser' and 'ccUser' fields to avoid empty elements.
2024-09-11 21:52:34 +02:00
f1505a9d15
Add locale to workflow URLs in notification templates
This is required to send notification within a console command
2024-09-11 21:16:54 +02:00
4e588ed0e0
Add logging to SignatureStepStateChanger
Enhanced the SignatureStepStateChanger by integrating a LoggerInterface to provide detailed logging at key points in the state transition process. This includes informational messages when marking signatures or skipping transitions, as well as debug messages when determining the next steps.
2024-09-11 21:14:07 +02:00
70671dadac
Refactor workflow guard logic and add internal methods
Removed guard logic from EntityWorkflowTransitionEventSubscriber and created a new EntityWorkflowGuardTransition class for separation of concerns. Marked several setter methods in EntityWorkflowStepSignature as internal to guide proper usage. Added comprehensive tests to ensure the new guard logic functions correctly.
2024-09-11 21:13:58 +02:00
5dfbdad13d
Release 2.24.0 2.24.0 2024-09-11 14:31:52 +02:00
b3e2d4ff9f Merge branch '306-invalidate-downloaded-document' into 'master'
Remove documents from memory after download

Closes #306

See merge request Chill-Projet/chill-bundles!727
2024-09-11 12:29:37 +00:00
01c2848a83
Fix deprecated method in redis 2024-09-11 14:23:23 +02:00
d0ee381627
Upgrade of php-cs-fixer 2024-09-11 14:21:32 +02:00
8b1b255050
Remove documents from memory after download
Implemented functionality to remove documents from browser memory 45 seconds after they are converted or downloaded. This ensures that clicking the download button again re-downloads the document. The reset state function was added to both ConvertButton.vue and DownloadButton.vue components.
2024-09-11 13:22:49 +02:00
f0d581b7f8 Merge branch '291_workflow_pdfsignedmessagehandler' into 'signature-app-master'
Lorsque tous les usagers ont signé un workflow, le workflow retourne à l’envoyeur avec une étape « workflow signé »

See merge request Chill-Projet/chill-bundles!726
2024-09-11 07:23:51 +00:00
nobohan
1197a46f5f
Refactor PDF signature handling and add signature state changer
Simplified PdfSignedMessageHandler by delegating signature state changes to a new SignatureStepStateChanger class. Added utility method to EntityWorkflowStepSignature for checking pending signatures and created new test cases for the SignatureStepStateChanger.
2024-09-10 21:27:55 +02:00
00e878892e Merge branch '305-convert-to-pdf-on-signature-step' into 'signature-app-master'
Convert a document to pdf when an entity workflow arrives in a signature step

See merge request Chill-Projet/chill-bundles!724
2024-09-10 18:42:10 +00:00
941444b7d5
Add event subscriber to convert docs to PDF before signature
Introduce ConvertToPdfBeforeSignatureStepEventSubscriber to convert documents to PDF when reaching a signature step in the workflow. Includes tests to ensure the conversion process only triggers when necessary.
2024-09-10 17:48:32 +02:00
a60ea0e066
Add StoredObjectToPdfConverter service and unit tests
Introduced the StoredObjectToPdfConverter service to handle conversion of stored objects to PDF format. Added unit tests to ensure proper functionality, including versioning and exception handling.
2024-09-10 17:48:32 +02:00
1ddd283f26
Add signer type differentiation for workflows
Added a method to determine if the signer is a 'person' or 'user'. Updated the signature template to handle both types accordingly, ensuring the correct entity type is displayed in workflow signatures.
2024-09-10 17:48:32 +02:00
669b967899
Enhance object version removal to exclude point-in-time versions
Add a check to exclude versions associated with points in time before deleting old object versions. This ensures that such versions are not mistakenly removed, providing greater data integrity. Updated tests and repository methods accordingly.
2024-09-10 17:48:31 +02:00
d33da6519a
Add StoredObjectPointInTime entity and related functionality
Implemented a new StoredObjectPointInTime entity to manage snapshots of stored objects. This includes related migrations, enum for reasons, repository, and integration with StoredObjectVersion.
2024-09-10 17:48:31 +02:00
f5ba5d574b
Add WopiConverter service and update Collabora integration tests
Introduce the WopiConverter service to handle document-to-PDF conversion using Collabora Online. Extend and update related tests in WopiConvertToPdfTest and ConvertControllerTest for better coverage and reliability. Enhance the GitLab CI configuration to exclude new test category "collabora-integration".
2024-09-10 17:48:31 +02:00
ccc11b1c1d Merge branch '295-cancel-workflow-after-90-days' into 'signature-app-master'
Create CancelStaleWorkflow message, handler and cronjob

See merge request Chill-Projet/chill-bundles!720
2024-09-09 13:27:12 +00:00
2fb46c65c2
Refactor CancelStaleWorkflowCronJobTest to simplify setup
Replaced KernelTestCase with TestCase to simplify test setup and removed dependency on the database connection. Added NullLogger to replace mocked LoggerInterface during testing. Updated method call in tests to correctly reference CancelStaleWorkflowMessage class.
2024-09-09 15:16:10 +02:00
f4356ac249
Add test for detecting stale workflows and enhance handler
Added a new test to check if workflows are stale in EntityWorkflowTest. Enhanced CancelStaleWorkflowHandler to handle stale workflows more accurately, including checking if workflows have transitioned recently. Updated EntityWorkflow entity to cascade remove workflow steps.

Refactor tests for handler, to avoid using $kernel during tests
2024-09-09 15:08:39 +02:00
d152efe084
Refactor imports and remove redundant type strings
This commit refactors the usage of \DateTimeImmutable to ensure consistent namespacing and removes unnecessary string type declarations from constants in CancelStaleWorkflowCronJob. These changes improve code readability and maintainability.
2024-09-09 14:58:19 +02:00
ee9530d03f
More conditions to find staled workflows 2024-09-09 10:46:35 +02:00
b97eabf0d2
Get workflowComponent directly from registry 2024-09-09 10:46:35 +02:00
2e69d2df90
Adjust test to work with actual workflow + minor fix of handler logic 2024-09-09 10:46:33 +02:00
cb446edd18
Suffix message class with 'Message' and add check on workflow to assert no transitions were applied since message placed in queue 2024-09-09 10:40:42 +02:00
5d84e997c1
Php cs fixes 2024-09-09 10:40:42 +02:00
35199b6993
Create test for CancelStaleWorkflowHandler: wip state 2024-09-09 10:40:42 +02:00