11280 Commits

Author SHA1 Message Date
nobohan
61d0005be8 DOC: add jwt key generation in the sf5 installationdoc 2024-06-24 09:14:58 +02:00
73797b98f6 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-20 17:32:09 +02:00
3d40db7493 Refactor AccompanyingCourseDocumentRepository.php
Build where clause using StoredObject directly instead\
of based on it's id.
2024-06-20 17:28:19 +02:00
760d65b972 Remove implementation of StoredObjectVoterInterface in AccompanyingCourseDocumentVoter.php
This implementation has been moved to the voter\ AccompanyingCourseDocumentStoredObjectVoter.php
2024-06-20 17:27:21 +02:00
d26fa6bde6 Implement voting logic: separation of concerns
A separate AccompanyingCourseDocumentStoredObjectVoter was\
created to handle the specific access to a Stored object\
related to an Accompanying Course Document.
2024-06-20 15:18:26 +02:00
427f232ab8 Correct namespace and use statement for StoredObjectVoterInterface.php
The namespace was formed wrong and needed adjustment
2024-06-20 10:53:33 +02:00
99818c211d
Fix cs: upgrade of php-cs-fixer 2024-06-19 12:18:20 +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
5bc542a567
remove symfony/phpunit-bridge 2024-06-19 12:16:51 +02:00
482f279dc5 Implement StoredObjectVoterInterface
An interface was created to be implemented by Stored Doc voters\
these will automatically be tagged and injected into DocStoreVoter.
2024-06-19 10:21:24 +02:00
e0828b1f0f Use service tags to inject all voters into StoredObjectVoter.php
Instead of manually injecting services into StoredObjectVoter\
config is added to automatically tag each service that implements\
StoredObjectVoterInterface.php
2024-06-19 10:17:50 +02:00
e015f71bb0 Rename voter.yaml file to security.yaml
For consistency with other bundles voters are\
registered under the security.yaml file.
2024-06-19 10:02:25 +02:00
04a48f22ad Use constructor property promotion
In accordance with php8.1 use property promotion\
within the constructor method. Less clutter.
2024-06-19 10:00:10 +02:00
ad4fe80240 Add fall-back right for ROLE_ADMIN
Within the StoredObjectVoter.php also the admin\
user should be able to edit documents as a fall-back
2024-06-19 09:52:59 +02:00
4b82e67952 Type-hint $subject in StoredObjectVoterInterface.php
Since the subject passed to these voters should\
always be of the type StoredObject, type-hinting\ added.
2024-06-19 09:51:21 +02:00
c8ccce83fd
add a dependency on smalot/pdfparser to parse signature zone within pdf 2024-06-18 17:47:16 +02:00
47f4cfddbb
Prepare for 2.21.0 2.21.0 2024-06-18 10:16:39 +02:00
e95f9e9846 Merge branch '282-add-dates-job-filter' into 'master'
Add dates ranges to job and scope filter and aggregator (accompanying course's exports)

Closes #282

See merge request Chill-Projet/chill-bundles!699
2024-06-18 07:54:49 +00:00
1f4bef754d
Refactor callback functions to arrow functions
The callback functions used in the addViewTransformer method in FilterType.php and AggregatorType.php were replaced with shorter arrow functions. This change was made to increase code readability and encourage consistency throughout the codebase.
2024-06-18 09:35:57 +02:00
19e34d5dc0
PHP CS Fixer updated (3.57.2 -> v3.59.3) 2024-06-17 17:28:29 +02:00
fab00f679c
Add date range to UserJobAggregator
This update includes adding start_date and end_date to UserJobAggregator. This addition allows the selection of a date range in the export feature. Accompanying this change are associated translations and tests.
2024-06-17 17:16:02 +02:00
791b3776c5
Add date range filter to referrer scope aggregator
A date range filter was added to the 'ReferrerScopeAggregator' class. This new feature allows users to filter courses by their referrer's scope based on a specified date range. In addition, relevant unit tests and translations were updated to support this new functionality.
2024-06-17 17:15:53 +02:00
6bd38f1a58
Refactor assertions in AbstractAggregatorTest
The conditional checks in the AbstractAggregatorTest have been simplified. Instead of a complex inline condition with multiple checks, the test now uses straightforward assertions. This makes the code cleaner and easier to understand.
2024-06-17 15:31:33 +02:00
68d21c9267
Update ReferrerAggregator to specify a date range as parameter
The ReferrerAggregator in ChillPersonBundle has been updated to include start and end dates, replacing the previous single computation date. This provides greater flexibility in setting the timeframe for referrer data. The messages.fr.yml file has also been updated to reflect these changes. Relevant tests have been updated to match the new functionality.
2024-06-17 15:22:28 +02:00
e7ca89e0c1
Rename DataTransformerFilterInterface to DataTransformerInterface
The DataTransformerFilterInterface has been renamed to DataTransformerInterface to reflect expanded functionality. Now, this interface can be implemented not only by @see{FilterInterface}, but also by @see{AggregatorInterface}. This change allows transforming existing data in saved exports and replacing it with some default values, or new default values.
2024-06-17 15:20:54 +02:00
fc8bc33ba9
Add startDate and endDate on UserScopeFilter 2024-06-17 14:31:12 +02:00
cbd9489810
Add startDate and endDate on UserJobFilter 2024-06-17 14:10:32 +02:00
e9a9262fae Add config voter.yaml
The voter.yaml was not configured to be taken into account. Now added\
to ChillDocStoreExtension.php
2024-06-14 17:27:22 +02:00
d9e37d0958 Refactorize StoredObjectVoter.php
The StoredObjectVoter.php has been refactorized to handle context-specific voters.\
This way we can check if the context-specific voter should handle the authorization or not.\
If not, there is a simple fallback to check on the USER_ROLE.
2024-06-14 17:25:24 +02:00
65c41e6fa9 Add StoredObjectVoterInterface
An interface is defined that can be implemented by each context-specific voter in the future.
2024-06-14 16:48:09 +02:00
7923b5a1ef initial commit 2024-06-14 15:35:50 +02:00
4a229ebf6b Initial commit 2024-06-14 15:32:51 +02:00
90b615c5b2
Add data transformation interface for filters
Introduced a new DataTransformerFilterInterface that allows transforming filter's form data before it is processed. Updated the FilterType file to add a view transformer if the filter implements this new interface. This new transformation process caters to transforming existing data in saved exports and replacing it with default values.
2024-06-14 14:38:10 +02:00
5ca222b501 Merge branch '122-improve-list-rendez-vous' into 'master'
Update calendar list display for the the next calendar in search results

Closes #122

See merge request Chill-Projet/chill-bundles!700
2024-06-13 16:12:57 +00:00
3e4495dd6e
Refactor AccompanyingPeriod::getNextCalendarForPerson to enhance performance 2024-06-13 18:07:19 +02:00
bca0d04201
Update calendar list display for the the next calendar in search results
The calendar list display in ChillPersonBundle has been revamped, including a new view and style modifications. This update enables the display of calendars as a list for easy navigation with an added authorization check. Also, a new SCSS file named "calendar-list.scss" has been created and imported to enhance the UI/UX design.
2024-06-13 18:07:19 +02:00
f66ac50571 Merge branch '616_rapid-action' into 'master'
Flash menu rapid action in search results

See merge request Chill-Projet/chill-bundles!441
2024-06-13 10:32:30 +00:00
b454774836
add changie [ci-skip] 2024-06-13 12:21:19 +02:00
008f344e49
Update calendar and activity voters in security checks
This commit adjusts the conditions in CalendarVoter and ActivityVoter security checks. Now it takes into account both STEP_DRAFT and STEP_CLOSED statuses in determining permissions. This enhancement ensures tighter control over specific actions in these two scenarios, enhancing the overall application security.
2024-06-13 12:17:14 +02:00
90bfd87ec6
Implement security checks for menu options
The changes in this commit add security checks before displaying menu options for creating new objects on Accompanying Period.
2024-06-13 12:08:24 +02:00
cc0030c1cd
Fix adding quick menus to list_with_period.html.twig
- update twig namespaces
- move twig file within Resources
2024-06-13 12:07:34 +02:00
d60ba3ecb2
Merge remote-tracking branch 'origin/master' into 616_rapid-action 2024-06-12 16:45:43 +02:00
cd5001ac74 Merge branch 'issue178_affichage_metiers' into 'master'
Display users and jobs at the date that they executed some task

See merge request Chill-Projet/chill-bundles!641
2024-06-12 14:41:40 +00:00
98f47ac512
fixes for normalising accompanying periods in docgen context 2024-06-12 16:35:53 +02:00
31b541d12f
Update AccompanyingPeriodWorkNormalizer and related classes
Updated the AccompanyingPeriodWorkNormalizer, its test, and the related entity class. Now, the normalizer includes additional checks for different formats and conditions, and cleans the context accordingly before processing. AccompanyingPeriodWorkDocGenNormalizerTest now extends from a new abstract base class. Changes are made in AccompanyingPeriodWork entity for datetime handling and serialization.
2024-06-12 11:47:13 +02:00
72045ce082
Add DocGenNormalizerTestAbstract class
A new class, DocGenNormalizerTestAbstract, was added to the ChillDocGeneratorBundle. This abstract class tests the normalization of null values and ensures they comply with expected formats and behaviors. It implements key methods that allow for providing non-null objects, expectation setting, and normalization.
2024-06-12 11:46:49 +02:00
0bfb3de465
fix cs 2024-06-11 16:58:33 +02:00
9ec4c77fb7
systematically at a parameter 'at_date' when displaying createdBy in twig template
The rendering of the 'createdBy' entity has been updated across various .twig files to include the 'at_date' property. This makes the date an entity was created more explicit, providing clearer information to the user.
2024-06-11 16:55:15 +02:00
77c53972c8
Add DateTimeImmutable support in UserNormalizer
This commit introduces the use of DateTimeImmutable in the UserNormalizer class to ensure immutability of datetime objects. A check is also added to convert DateTime instances to DateTimeImmutable when normalizing data. This enhances the safety and predictability of datetimes used in the application.
2024-06-11 16:33:54 +02:00
350d991a85
Update AccompanyingPeriod normalization with UserHistory
The AccompanyingPeriod normalization now includes 'createdBy' and 'ref' fields from the UserHistory. AccompanyingPeriodDocGenNormalizer has been modified adding UserHistory retrieval and subsequently normalization. A new method was also added to the AccompanyingPeriod entity to retrieve the current UserHistory.
2024-06-11 16:33:37 +02:00