64 Commits

Author SHA1 Message Date
64d91e2afe
Allow users to edit a document if they were added to the previous step of a workflow.
OP#826 Workflow - les utilisateurs des étapes précédentes sur un workflow doivent aussi avoir la main sur les étapes en cours du workflow (Vendee/accent-suivi-developpement/1289)

https://champs-libres.openproject.com/work_packages/826
2024-11-08 20:34:45 +01:00
ff5640e193
Allow to edit storedObject associated with workflow which are canceled
OP#753
2024-10-21 17:41:59 +02:00
9a9d14eb5a
Enhance behaviour of duplicating storedObject to keep only the last "kept before conversion" version if any
Enhance the duplication service to selectively handle versions tagged with "KEEP_BEFORE_CONVERSION". Modify StoredObject to support retrieval and checking of such versions. Add relevant test cases to validate this behavior.
2024-10-04 13:41:18 +02:00
5f67a7aadc
Create a service to duplicate a storedObject into another one 2024-09-19 17:48:03 +02:00
77d06d756a
Block document editing if any signature associated to a workflow is signed
Add a check in `WorkflowStoredObjectPermissionHelper` to block document editing once any signature is signed. Accompanied by new tests to verify this behavior.
2024-09-19 16:18:16 +02:00
5906171041
Add restoration functionality for stored object versions
Introduce a service to restore stored object versions along with relevant tests and an API endpoint. This includes database migrations for version relationships, enhancing stored object version tracking.
2024-09-19 13:42:23 +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
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
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
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
6e9f111fd9
Fix syntax errors in RemoveExpiredStoredObjectCronJob class
Correct syntax errors involving constant definitions in the RemoveExpiredStoredObjectCronJob class. This change ensures compliance with PHP's constant declaration standards.
2024-09-04 14:45:17 +02:00
313fb9ffdf
PHP CS Fixer updated (3.63.1 -> v3.64.0) 2024-09-04 14:38:56 +02:00
667e144681
Add PDF signature zone availability checks
Introduce `PDFSignatureZoneAvailable` service to check available PDF signature zones. Updated `WorkflowAddSignatureController` to use the new service. Added unit tests to verify the correctness of the functionality.
2024-09-04 14:09:53 +02:00
e17203ca3a
Add PDF signature zone availability checks
Introduce `PDFSignatureZoneAvailable` service to check available PDF signature zones. Updated `WorkflowAddSignatureController` to use the new service. Added unit tests to verify the correctness of the functionality.
2024-09-04 13:55:08 +02:00
c6a6d76790
Add signatureZoneIndex to PdfSignedMessage and related classes
Included signatureZoneIndex for PdfSignedMessage in class definitions, handlers, and serializers to support signature zones. Updated test cases to reflect this new property, ensuring robust validation for handling and serialization.
2024-09-03 15:44:25 +02:00
3d49c959e0
Update DropFile to handle object versioning 2024-09-03 15:42:04 +02:00
2d82c1e105
rector fixes after rector's upgrade 2024-08-28 15:34:13 +02:00
0db2652f08
Add cron job for removing expired stored objects
Introduced `RemoveExpiredStoredObjectCronJob` to automate the deletion of expired stored objects every 7 days. Enhanced associated tests and updated relevant interfaces and classes to support the new cron job functionality.
2024-08-28 14:06:11 +02:00
c38f7c1179
Add functionality to delete old versions of documents
This commit introduces a feature that automatically deletes old versions of StoredObjects in the Chill application. A cron job, "RemoveOldVersionCronJob", has been implemented to delete versions older than 90 days. A message handler, "RemoveOldVersionMessageHandler", has been added to handle deletion requests. Furthermore, unit tests for the new functionality have been provided.
2024-08-28 14:06:10 +02:00
67d24cb951
Use "createdAt" from database to compute the last modified datetime in StoredObjectManager
The code has been updated to use 'createdAt' from StoredObjectVersion entity in StoredObjectManager. Specifically, if a 'createdAt' datetime is set, we return that datetime. This change also includes corresponding test cases to validate the functionality. The situation helps deal with files created before July 2024.
2024-08-28 14:06:09 +02:00
3978ea9a47
Update StoredObjectManager to handle versioned StoredObjects
The StoredObjectManager and related test cases have been updated to handle versioned StoredObjects, allowing the same methods to work with either a StoredObject or its versions. The changes also involve return information for the write method and enhancements to the write test procedure. This provides more functionality and flexibility for handling StoredObjects in different versions.
2024-08-28 14:06:06 +02:00
8a374864fa
update code style after upgrade rector and phpstan 2024-08-28 14:03:26 +02:00
3836d0dc9b
Update PdfSignedMessageHandler to manage signature state
Additional dependencies have been added to the PdfSignedMessageHandler to handle the state of the signature. After writing the signed message content, the state is set to 'signed' and the state date is updated with the current time. Also, modifications are flushed in the EntityManager to save these changes to the database. Corresponding updates and tests have been made in the PdfSignedMessageHandlerTest file.
2024-07-22 23:40:10 +02:00
nobohan
567ca8a26f integrate signature vueapp to workflow 2024-07-19 11:42:08 +02:00
nobohan
67395f52b5 signature: fix cs + test PDFParser 2024-07-18 17:16:21 +02:00
nobohan
77da2c1ac6 signature: add index on PDFSignatureZone + init POST signature 2024-07-18 17:16:20 +02:00
nobohan
39d3ba2f40 signature: fake POSTing of signature, adjustments 2024-07-18 17:16:20 +02:00
8aec69f0f9
Merge remote-tracking branch 'origin/signature-app-master' into 286-storedobject-voter 2024-07-16 13:34:36 +02:00
d689ce9aef
Fix condition for checking if the user is allowed to edit a document attached to a workflow 2024-07-16 13:24:45 +02:00
d5e4991982
Rename WorkflowDocumentService to WorkflowStoredObjectPermissionHelper
The previous name, WorkflowDocumentService, was misleading as its functionality extends to all stored objects and not limited to documents. Therefore, it was renamed to WorkflowStoredObjectPermissionHelper. Consequently, all references to this service were updated throughout the codebase.
2024-07-16 13:24:45 +02:00
9e92ede16f
Handle cases when there are multiple EntityWorkflows associated with one entity 2024-07-15 21:22:30 +02:00
a887602f4f
Handle storing of new object in PdfSignedMessageHandler
The PdfSignedMessageHandler has been updated to handle pdf signed messages: the content is now stored within the object. Also, a PdfSignedMessageHandlerTest has been created to ensure the correct functionality of the updated handler.
2024-07-10 10:40:19 +02:00
790576863f Merge signature-app-master into branch 2024-07-04 15:53:01 +02:00
21b79c1981 Php cs fixes 2024-07-04 11:39:02 +02:00
a9f4f8c973 Resolve phpstan erorrs 2024-07-02 14:17:05 +02:00
c9d2e37cee Implement logic to check if editing of document is blocked by workflow
Using the workflow handlers we return the workflow that is attached to an object
so that within the workflowDocumentService we can then check whether this workflow blocks
the edition of a document.
2024-07-01 12:14:03 +02:00
c9d54a5fea
fix cs 2024-06-28 10:47:12 +02:00
9bc6fe6aff
Add PdfSignedMessage and its serializer
Added a new class, PdfSignedMessage, to handle received signed PDF messages. Also, added a serializer for this class, PdfSignedMessageSerializer, for use with messaging. Furthermore, comment documentation has been added to RequestPdfSignMessage and its serializer for better clarity. Updated unit tests are also included.
2024-06-27 21:52:24 +02:00
18a03fd740
Add signature messenger request serialization and processing
This update introduces a new serializer class for request messages (from messenger component). New features-includes encoding and decoding of request messages and handling unexpected value exceptions. A new test class for the serializer and it also adds functionality to process signature requests in the controller.
2024-06-27 13:38:19 +02:00
c06e76a0ee Implement context-specific voters for all current entities that can be linked to a document
For reusability an AbstractStoredObjectVoter was created and a StoredObjectVoterInterface.
A WorkflowDocumentService checks whether the StoredObject is involved in a workflow.
2024-06-27 11:31:39 +02:00
4607c36b57 Add WorkflowDocumentService and use in StoredObject voters
A WorkflowDocumentService was created that can be injected\
in context-specific StoredObject voters that need to check whether\
the document in question is attached to a workflow.
2024-06-27 11:31:39 +02:00
610239930b
Add serialization groups to PDFPage and PDFSignatureZone properties
The Symfony Serializer groups annotation has been added to all properties of the PDFPage and PDFSignatureZone classes. This change allows the serialization and deserialization process to be group-specific, ensuring only relevant data is processed during these operations.
2024-06-25 13:43:48 +02:00
89f5231649
Refactor PDFSignatureZoneParser to use float values
This update changes how we handle values in PDFSignatureZoneParser class. Specifically, we've modified the 'MediaBox' and 'PDFSignatureZone' variables to use float values. The helps ensure greater precision, minimize errors, and maintain data consistency across the application.
2024-06-25 13:25:49 +02:00
a9f0059743
Add PDF signature zone parsing functionality
This update introduces new services into the ChillDocStoreBundle for signature zone parsing within PDFs. The PDFSignatureZoneParser service identifies signature zones within PDF content while the additional classes, PDFPage and PDFSignatureZone, help define these zones and pages. Corresponding tests have also been
2024-06-19 12:17:25 +02:00
84f515d451
Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-05-28 14:16:01 +02:00
146e0090fb
Webdav: fully implements the controller and response
The controller is tested from real request scraped from apache mod_dav implementation. The requests were scraped using a wireshark-like tool. Those requests have been adapted to suit to our xml.
2024-05-23 17:00:42 +02:00
931c69eee4
Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-04-04 18:45:01 +02:00
fc88a5f40d Improve admin UX for configuration of document template (document generation) 2024-03-26 17:06:49 +00:00
f889d67e94
fixes after merge of master into upgrade-sf4 2024-02-12 22:31:16 +01:00