11517 Commits

Author SHA1 Message Date
3c9ee41b3b
fix some tests 2024-09-04 18:30:18 +02:00
2dd275a074 Merge branch '296-signature-menu-tab' into 'signature-app-master'
Add person menu entry for signature  list

See merge request Chill-Projet/chill-bundles!719
2024-09-04 15:13:14 +00:00
5f5d4b8f06 Add person menu entry for signature list 2024-09-04 15:13:14 +00:00
3e5a558cdf
Add exists method to RemoveOldVersionMessageHandlerTest
Introduce the exists method to handle checks for StoredObject or StoredObjectVersion in test cases. This modification ensures consistency and proper exception handling in the testing framework.
2024-09-04 15:18:07 +02:00
0e6b7d76a4
Add exists method to WebdavControllerTest
Included a new method `exists` to handle existence checks for StoredObject or StoredObjectVersion within WebdavControllerTest. This method currently always returns true, ensuring initial compatibility and providing a foundation for future logic refinements.
2024-09-04 15:10:18 +02:00
b2042bd1e4 Merge branch 'signature-app/object-version' into 'signature-app-master'
Add versioning to stored objects

See merge request Chill-Projet/chill-bundles!710
2024-09-04 12:46:43 +00: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
063bc2857f
Remove deprecated constants from StoredObjectNormalizer
Deleted the deprecated constants `ADD_DAV_SEE_LINK_CONTEXT` and `ADD_DAV_EDIT_LINK_CONTEXT` from the `StoredObjectNormalizer` class. These constants are no longer in use and their removal cleans up the codebase.
2024-09-04 14:34:49 +02:00
615629d1b4
Simplify entity relationship and enforce foreign key constraints
Removed the resetStoredObject() method call from StoredObject, adjusted the storedObjectId column in the stored_object_version table to be NOT NULL, and moved the association setup of the StoredObject entity directly into the constructor in StoredObjectVersion. This ensures that every StoredObjectVersion has a valid StoredObject and maintains database integrity.
2024-09-04 14:28:13 +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
nobohan
86896a12e6 Signature: download signed doc if signed 2024-09-03 11:25:05 +02:00
nobohan
3a959b7044 Signature app: rename userSignatureZones, remove zoneIndex, sign on click 2024-09-03 10:28:41 +02:00
nobohan
f8d95384ea Signature: action buttons positions 2024-09-02 18:05:12 +02:00
b6edbb3eed
Refactor StoredObject normalization handling
Deprecate and remove specific context constants from StoredObjectNormalizer. Update object properties for better clarity and add permissions handling. Introduce related tests and adjust other files relying on the old context constants.
2024-08-28 23:19:24 +02:00
00cc3b7806
Refactor backend for getting signed url 2024-08-28 18:00:20 +02:00
7ab52ff09e
Add stored object creation endpoint
Introduced a new API endpoint to create stored objects with access control for roles 'ROLE_ADMIN' and 'ROLE_USER'. Updated corresponding routes, removed unused dependencies, and added unit tests to ensure functionality.
2024-08-28 15:34:42 +02:00
2d82c1e105
rector fixes after rector's upgrade 2024-08-28 15:34:13 +02:00
e477a49c92
Integrate SwaggerUI with direct download and cleanup package
Added a customized SwaggerUI HTML template under Dev directory. Removed outdated swagger-ui dependency from package.json to streamline dependency management.
2024-08-28 15:26:19 +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
cb90261309
Update random_bytes length in filename and prefix generation
The size of the random byte string used in the generateFilename method of StoredObjectVersion has been reduced from 16 to 8. Conversely, the size of the random byte string used in the generatePrefix method of StoredObject has been increased from 8 to 32.

The naming generation fit better with the usage, as 16bytes are generated for each file (more version), and less for the version.
2024-08-28 14:06:09 +02:00
2feea24c41
Add Collabora configuration guide and NullProofValidator class
A new document detailing the configuration steps for enabling Collabora in development has been added. This includes setting up ngrok and configuring both the Collabora and Symfony servers. Furthermore, a new class, NullProofValidator, has been created for validation during the development process. This class always returns true, making it useful for debugging purposes.
2024-08-28 14:06:08 +02:00
1b16d4fe3b
Flush entities when storing document using webdav / put operation
The WebdavController has been updated to flush the EntityManager after writing a document, while its tests have been adjusted correspondingly. A new test for the document PUT operation has also been added, which ensures the EntityManager flushes and the StoredObjectManager writes to this document.
2024-08-28 14:06:08 +02:00
ce5659219a
Fix test 2024-08-28 14:06:07 +02:00
5fefe09a39
Fix test 2024-08-28 14:06:07 +02:00
e21db73b84
Refactor and simplify document management functionality to adapt to StoredObject versioning
This commit includes several updates to the document management functionality within ChillWopiBundle and ChillDocGeneratorBundle, refactoring for simplicity and improved readability.
2024-08-28 14:06:07 +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
4fbb7811ac
Refactor StoredObjectDataMapper to use registerVersion method
Removed saveHistory and set methods in StoredObjectDataMapper and replaced them with one call to registerVersion.
2024-08-28 14:06:06 +02:00
2b7ea4178b
Add versioning to stored objects
This update introduces a versioning system to the stored objects in the ChillDocStoreBundle. The 'StoredObject' entity now includes several new methods, and maintains a collection of 'StoredObjectVersion' instances. Each time a 'StoredObject' is modified, a new version instance is created and added to the collection, ensuring a history of changes. Migration file for the addition of new database column included. Corresponding tests are also updated.
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
bb848746d5
Merge branch 'upgrade-sf5' into signature-app-master 2024-08-28 13:23:12 +02:00
3738c110f8
Add missing import 2024-08-28 12:38:11 +02:00
f57fdb2b4c
Add missing import 2024-08-28 12:32:19 +02:00
b57824fc7e
Update Rector skip configuration
Replaced Symfony Rector rules with Doctrine rule in the skip list due to a known issue. Refer to the linked GitHub issue for more details on the bug.
2024-08-28 12:21:43 +02:00
6b4e1ed2d3
PHP CS Fixer updated (3.59.3 -> v3.63.1) 2024-08-28 12:06:08 +02:00
b0485dbcc8
Replace ArrayCollection with Collection&Selectable on some entity typing (fix previous commit)
Updated entity properties to use Collection&Selectable for better type safety and interoperability. This change affects User, Household, Calendar, Person, AccompanyingPeriod, and EntityWorkflow classes.
2024-08-28 12:04:43 +02:00
c16219dc6d
Force typing for ArrayIterator in EntityWorkflow 2024-08-28 11:48:24 +02:00
ad47804c91 Apply rector changes to Collection typing 2024-08-27 16:23:08 +02:00
85e2466611 Cherry-pick phpstan fixes after rector changes 2024-08-27 16:09:12 +02:00
94d6b5eff8 Merge branch 'upgrade-sf5' of gitlab.com:Chill-Projet/chill-bundles into upgrade-sf5 v3.0.0 2024-08-26 18:15:13 +02:00
d87f380f16 Update chill bundles to version 3.0.0 2024-08-26 18:14:48 +02:00
58bf722fae remove the "v" prefix for file, to create release with tags starting with "v". 2024-08-26 14:21:43 +00:00
50fb79ebbf Remove enforcement of https scheme within controller method 2024-08-26 15:42:28 +02:00
58912f1d98 Add changie for fixes to CollectionType js v3.0.0-RC12 2024-08-22 14:24:58 +02:00
9604ba5f4b Merge branch 'person_resource_abstract_class' into 'upgrade-sf5'
Create abstract class for person resource and corrections made to CollectionType js

See merge request Chill-Projet/chill-bundles!716
2024-08-22 12:22:52 +00:00