Commit Graph

12959 Commits

Author SHA1 Message Date
b171afba2f Add _editor and lock to StoredObjecNormalizer. Refactor StoredObjectNormalizerTest to use prophecy and add tests for lock and editor states
- Replaced PHPUnit mocks with prophecy for improved flexibility in `StoredObjectNormalizerTest`.
- Added test cases to cover lock handling and editor state evaluation for WebDAV and WOPI methods.
- Updated `StoredObjectNormalizer` to include lock normalization and editor state computation logic.
- Extended TypeScript types to reflect lock and editor states in the front-end model.
2026-04-13 14:26:37 +02:00
bb9da5dada Merge branch 'refs/heads/master' into 508-lock-stored-object 2026-04-13 12:59:40 +02:00
012dc3c27d Add StoredObjectEditorDecisionManager with tests and interface for editability decisions
- Implemented `StoredObjectEditorDecisionManager` to assess editability of stored objects based on lock status and methods.
- Created `StoredObjectEditorDecisionManagerInterface` to define the contract for decision logic.
- Added comprehensive test suite `StoredObjectEditorDecisionManagerTest` to validate scenarios including lock absence, conflicting lock methods, and compatible WOPI locks.
2026-04-13 12:34:47 +02:00
cca70e3e52 Merge branch 'ticket-app-master' into 'master'
Add a bundle to deal with tickets (tasks, requests) inside chill

See merge request Chill-Projet/chill-bundles!697
2026-04-13 08:44:19 +00:00
4c86dcb9ff Add createdAt field normalization in StoredObjectLockNormalizer and update related test
- Modified `StoredObjectLockNormalizer` to include the `createdAt` field in the normalized output.
- Updated `StoredObjectLockNormalizerTest` to reflect the new `createdAt` field, including test assertions and normalization logic adjustments.
2026-04-10 12:33:14 +02:00
c0baaf528a Merge branch 'wp-2227-synchronize-person-from-helpit-api' into 'ticket-app-master'
Add fields for upsert person

See merge request Chill-Projet/chill-bundles!979
2026-04-10 10:06:25 +00:00
Boris Waaub
aa54e82c6c Add fields for upsert person 2026-04-10 10:06:24 +00:00
Boris Waaub
ac1ae2a3c6 Restore unit test in pipeline 2026-04-09 10:27:00 +02:00
3905b7c9a7 Add StoredObjectLockNormalizer with corresponding test suite
- Implemented `StoredObjectLockNormalizer` to handle JSON normalization for `StoredObjectLock` entities.
- Added `StoredObjectLockNormalizerTest` to verify normalization logic, format support, and edge cases.
2026-04-08 22:36:27 +02:00
003cccfdc4 Update foreign key constraint to include ON DELETE CASCADE for storedobjectlock_uuid
- Modified migration `Version20260331122339` to apply `ON DELETE CASCADE` to the foreign key constraint on `storedobjectlock_uuid` in `stored_object_lock_user` table.
- Ensures dependent records are removed automatically when the parent `stored_object_lock` is deleted.
2026-04-08 22:26:53 +02:00
c60383b636 Add CleanOldLockCronJob service and corresponding test suite
- Introduced `CleanOldLockCronJob` to handle scheduled cleaning of old locks.
- Implemented tests in `CleanOldLockCronJobTest` to verify behavior, including conditions for execution based on elapsed time.
- Utilized `MockClock` for precise time-based testing scenarios.
2026-04-08 22:26:43 +02:00
678ec844e2 Add service to clean expired locks and related tests
- Introduced `CleanOldLock` service to remove expired locks older than 24 hours.
- Added `removeExpiredBefore` method in `StoredObjectLockRepository` for efficient deletion of expired locks.
- Created `CleanOldLockTest` to verify the cleaning service functionality using `MockClock`.
2026-04-08 22:26:27 +02:00
4afdc9a7cc Add WebDAV lock and renew functionality with comprehensive tests
- Implemented `WebdavLockController::lockDocument` to handle LOCK requests for creating and renewing locks.
- Introduced access control checks using `StoredObjectRoleEnum::EDIT` to restrict lock operations to authorized users.
- Added test suite `WebdavLockControllerTest` to validate locking and renewing scenarios, including edge cases.
- Refactored lock logic into `lockOrRenewToken` for streamlined processing.
2026-04-08 21:33:00 +02:00
25962e0e39 Update setLock to reuse existing lock without generating new lock ID
- Modified `StoredObjectLockManager` logic to prevent unnecessary lock ID regeneration when updating existing locks.
- Added `testSetLockExistingUpdatesLockWithoutNewLockId` to verify behavior.
- Ensured `persist` is not called again for existing locks.
2026-04-08 21:32:45 +02:00
4a224054e2 Extract WebDAV PUT logic into a dedicated WebdavPutController and add comprehensive tests
- Moved `putDocument` method from `WebdavController` to the new `WebdavPutController`.
- Introduced stricter locking and permission checks during PUT operations.
- Added new test suite `WebdavPutControllerTest` to cover different scenarios, including lock validation and access control.
- Updated existing logic in `WebdavControllerTest` to reflect these changes.
2026-04-03 18:01:23 +02:00
a1d72cefff Add LockTokenParser::parseIfCondition method and corresponding tests
- Implemented the `parseIfCondition` method in `LockTokenParser` to extract lock tokens from `if` headers.
- Added `LockTokenParserTest` with multiple test cases using data providers to validate parsing logic, including scenarios with no headers, resource URIs, and "not" conditions.
2026-04-03 18:01:04 +02:00
ff9e4f2709 Implements controllers for locking and unlocking with the webdav protocol (wip) 2026-04-02 14:36:13 +02:00
a3b857253a Add LockTokenCheckResultEnum for lock token validation results
- Introduced `LockTokenCheckResultEnum` with cases to handle various lock token validation outcomes:
  - `NO_LOCK_FOUND`
  - `LOCK_TOKEN_DO_NOT_MATCH`
  - `LOCK_TOKEN_DO_NOT_BELONG_TO_USER`.
2026-04-02 14:35:26 +02:00
c9a632f3a9 Add LockTimeoutAnalyzer utility and corresponding tests
- Implemented `LockTimeoutAnalyzer` to parse timeout values from RFC-compliant strings and return `DateInterval` objects.
- Added `LockTimeoutAnalyzerTest` with data providers to validate handling of various timeout cases, including "Second" and "Infinite".
2026-04-02 14:35:20 +02:00
ba2288de55 Add support for Lock-Token header in DavResponse
- Updated `DAV` header to include version 2.
- Introduced `setLockToken` method to add a `Lock-Token` header.
2026-04-02 14:35:08 +02:00
9f8e349a85 Refactor ChillDocumentLockManager to delegate lock operations to StoredObjectLockManager
- Replaced inline lock management logic with `StoredObjectLockManager` to handle lock operations (create, delete, retrieve, existence check).
- Updated constructor to require `StoredObjectLockManager` and removed unused dependencies.
- Simplified methods (`setLock`, `deleteLock`, `hasLock`, `getLock`) by leveraging `StoredObjectLockManager`.
- Removed `onKernelTerminate` event listener and deferred flush logic.
- Updated existing tests in `ChillDocumentLockManagerTest` to reflect changes and ensure compatibility.
2026-04-02 14:34:56 +02:00
76d3612d33 Refactor ChillDocumentLockManager to use database locks and add related tests
- Replaced Redis-based locking mechanism with database-based `StoredObjectLock` management using `EntityManagerInterface`.
- Integrated `MockClock` and `Security` components for lock timing and user association.
- Updated test cases to include database persistence and user assignment during lock operations.
- Implemented `onKernelTerminate` event listener to handle deferred database flush for lock updates.
2026-03-31 21:04:05 +02:00
277e4fa490 Add RandomUserTrait to retrieve random user for testing
- Implemented `getRandomUser` method to fetch a random user using `EntityManagerInterface`.
- Added support for random user retrieval by querying `User` entity repository.
2026-03-31 17:32:36 +02:00
fe11780ad5 Add method to check lock activity and corresponding tests
- Added `isActiveAt` method in `StoredObjectLock` to check if a lock is active at a specific time.
- Implemented `isLockedAt` method in `StoredObject` to determine if an object is locked at a given time.
- Included unit tests for `isActiveAt` method in `StoredObjectLockTest` to validate various scenarios.
2026-03-31 17:32:24 +02:00
c1e5346ef9 Add locking mechanism for stored objects
- Created `StoredObjectLock` entity to manage locks on stored objects.
- Introduced `StoredObjectLockMethodEnum` to define locking methods.
- Added relationships between `StoredObject` and `StoredObjectLock` with appropriate methods for management.
- Added database migrations to create necessary tables and constraints for lock handling.
2026-03-31 14:50:35 +02:00
Boris Waaub
fa2c1454d1 Merge branch 'master' into ticket-app-master 2026-03-30 14:55:17 +02:00
6cc394b006 Merge branch 'master' into ticket-app-master
# Conflicts:
#	.junie/guidelines.md
#	src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue
#	src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ButtonLocation.vue
2026-03-26 16:26:35 +01:00
d4a625f6b5 Add unreleased changelog entry for ticket-related schema changes
- Documented the addition of a new bundle dealing with tickets.
- Categorized the changes as "Major" with potential schema modifications.
2026-03-26 16:21:18 +01:00
1f7a98a89b Add "Major" label configuration in .changie.yaml
- Introduced the "Major" label with automatic version bumping to major releases.
2026-03-26 16:21:11 +01:00
297628d06f Merge branch 'add-group-center-repository-interface' into 'master'
Create interface GroupCenterRepositoryInterface

See merge request Chill-Projet/chill-bundles!978
2026-03-25 13:41:05 +00:00
3bc12a5469 Create interface GroupCenterRepositoryInterface 2026-03-25 13:41:03 +00:00
300547ad14 Merge branch '507-external-id-center' into 'master'
Resolve "Ajout d'un champ "externalId" pour les centres"

Closes #507

See merge request Chill-Projet/chill-bundles!977
2026-03-24 15:41:31 +00:00
dcccbb36f4 Resolve "Ajout d'un champ "externalId" pour les centres" 2026-03-24 15:41:31 +00:00
d1fe1be0f8 Merge branch 'feature/interesting-release-note-changie' into 'master'
Add IRN field to Changie configuration for release note tagging

See merge request Chill-Projet/chill-bundles!976
2026-03-24 14:45:00 +00:00
6654bea48f Add IRN field to Changie configuration for release note tagging 2026-03-24 14:45:00 +00:00
bd4c5adfa6 Remove unused DenormalizerInterface in PersonJsonNormalizerInterface
- Simplified interface implementation by keeping only `NormalizerInterface`.
2026-03-23 13:37:02 +01:00
3c4c4ee542 Restrict "Tickets" menu item visibility based on user permissions
- Added `Security` service to `SectionMenuBuilder` for access control.
- Display "Tickets" menu item only if the user has `TicketVoter::READ` permission.
2026-03-23 13:36:54 +01:00
8c80df77f6 Remove unused @symfony/ux-translator dependency from package.json
- Cleaned up `package.json` by deleting the reference to `@symfony/ux-translator` as it is no longer used.
2026-03-23 12:56:48 +01:00
a791fea794 Merge branch 'task/1421-backend-droits-pour-les-tickets-visualiser-modifier-supprimer' into 'ticket-app-master'
Ajout de permissions sur le module Ticket

See merge request Chill-Projet/chill-bundles!975
2026-03-23 11:44:30 +00:00
eff0f6bcda Ajout de permissions sur le module Ticket 2026-03-23 11:44:30 +00:00
63fc600be6 Merge branch 'wp-task/2158-faire-passer-en-configuration-yaml-les-activations-d-sativations-des-onglets-sur-la-page-d-accueil' into 'ticket-app-master'
Add configurable homepage tabs with validation for default tab inclusion

See merge request Chill-Projet/chill-bundles!974
2026-03-20 11:59:06 +00:00
fff9a5b95f Add configurable homepage tabs with validation for default tab inclusion 2026-03-20 11:59:05 +00:00
59d8bf75b2 Refactor PersonACLAwareRepository to simplify condition handling in search clause construction
- Replaced `count` check with an `empty` comparison for clarity.
- Streamlined conditional logic for search clause initialization.
- Removed unnecessary `isset` check before applying `andWhereClause`.
2026-03-19 17:15:23 +01:00
eb2dfc8591 Release v4.14.2 v4.14.2 2026-03-18 09:18:33 +01:00
b5a22508ff Merge branch 'fix/fix-link-notification-email' into 'master'
Fix notification email links to handle user and non-user contexts

See merge request Chill-Projet/chill-bundles!973
2026-03-18 08:16:41 +00:00
f12bc2f35f Fix notification email links to handle user and non-user contexts 2026-03-18 08:16:40 +00:00
9ba8ec8f41 Release v4.14.1 v4.14.1 2026-03-16 15:55:52 +01:00
6a66f05451 Merge branch '506-fix-permissions-list-activity-by-person' into 'master'
Replace `ActivityVoter::SEE` with `AccompanyingPeriodVoter::SEE` for correct authorization check

Closes #506

See merge request Chill-Projet/chill-bundles!972
2026-03-16 14:54:47 +00:00
1524ed8ce9 Replace ActivityVoter::SEE with AccompanyingPeriodVoter::SEE for correct authorization check 2026-03-16 14:54:47 +00:00
0aa0824831 Merge branch '505-fix-user-group-notification-email' into 'master'
Resolve "Notification aux groupes utilisateurs"

Closes #505

See merge request Chill-Projet/chill-bundles!971
2026-03-16 14:08:36 +00:00