11064 Commits

Author SHA1 Message Date
1310d53589 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-26 14:04:08 +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
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
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
6db36d5ab6
Remove ChillEventBundle and refactor framework.yaml configurations
This commit involves the deletion of ChillEventBundle from the bundles configuration. Additionally, test framework configurations are handled in a consolidated manner by moving assets configurations (json_manifest_path) from test/framework.yaml to framework.yaml. The obsolete test/framework.yaml has been deleted as it is no longer needed.
3.0.0-RC1
2024-06-04 21:55:53 +02:00
59f721934e
Refactor export download script to use ES6 and webpack
The export download script was refactored to use ES6 syntax and webpack's modular system. This included separating out the download script into its own file for better organization, removing globally-scoped JavaScript, and adding the new download script as a webpack entry point. Also, the import method for the 'mime' library was adjusted to use ES6 syntax.
2024-06-04 21:53:32 +02:00
84ce8a93f3
Refactor ISOToDateTime to handle case when timezone's server is UTC
A condition is added to check if the timezone is set as '0000' (UTC timezone), if yes then a new Date is returned with the Date.UTC method. This ensures that the time returned correctly reflects the current timezone
2024-06-01 00:40:22 +02:00
ab5f2ffb65
add script to run php-cs-fixer 2024-06-01 00:35:36 +02:00
73bae8ccb9
fix indentation 2024-06-01 00:35:26 +02:00
dcfa569e3a
Upgrade CKEditor and refactor configuration with use of typescript 2024-06-01 00:35:08 +02:00
4b07fe3622
Update address list import to latest compiled addresses
The import of the address list has been upgraded to use the latest version of the compiled addresses from Belgian-best-address. In the AddressReferenceBEFromBestAddress class, the RELEASE constant has been updated to point to the v1.1.1 tag.
2024-05-30 16:02:35 +02:00
48bf359d2e
Restore feature to see chill assets style preview in dev environment
This commit introduces a new dev.assets.html.twig file and updates the chill.yaml file to add new paths for the SASS Assets tests.
2024-05-28 16:34:32 +02:00
60c7ea601c
Update form builder parameter in SearchController
Changed the first argument in the `createNamedBuilder` method from `null` to an empty string. This adjustment ensures the form factory correctly creates the builder in the SearchController.
2024-05-28 16:00:03 +02:00
785c01d42d
enable parallelization in php-cs-fixer config 2024-05-28 14:58:31 +02:00
06dd7dd4f5
apply rector rules 2024-05-28 14:58:09 +02:00
84f515d451
Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-05-28 14:16:01 +02:00
27b0ec0ae7 Merge branch '145-permettre-de-visualiser-les-documents-dans-libreoffice-en-utilisant-webdav' into 'master'
Webdav access point to edit documents using LibreOffice

Closes #145

See merge request Chill-Projet/chill-bundles!592
2024-05-28 11:36:57 +00:00
9f141468c7
fix phpstan, cs, and rector rules 2024-05-28 13:23:54 +02:00
56d173046d
fix phpstan, cs, and rector rules 2024-05-28 12:54:56 +02:00
059e4a0acd
fixes for feature "refactor store object form widget" 2024-05-28 12:31:46 +02:00
111a21fcec
Add new file for StoredObjectType tests and update class definitions
This commit adds a new file, StoredObjectTypeTest.php, to ChillDocStoreBundle Tests. It contains unit tests for the StoredObjectType class. Changes are also made in StoredObjectNormalizer and StoredObjectDataMapper classes, making JWTDavTokenProviderInterface and UrlGeneratorInterface as readonly in StoredObjectNormalizer and removing unnecessary EntityManagerInterface and debug commands on StoredObjectDataMapper. These changes improve test coverage and optimize the code for better performance.
2024-05-28 12:08:02 +02:00
775535e683
refactor file drop widget 2024-05-28 11:25:59 +02:00
47a928a6cd
Add DAV edit link to StoredObject serialization
Enabled the adding of access link, specifically DAV edit link to the JSON serialization of the StoredObject entity. The patch also adjusted the serializer groups of various attributes of StoredObject from "read, write" to "write". Lastly, these changes were reflected in the accompanying CourseWork Controller and the FormEvaluation Vue component.
2024-05-23 18:25:20 +02:00
0dd58cebec
optional parameter after the required one 2024-05-23 17:00:46 +02:00
4cff706306
Apply new CS rules on the webdav feature 2024-05-23 17:00:46 +02:00
fca929f56f
Dav: add UI to edit document 2024-05-23 17:00:46 +02:00
8d44bb2c32
Dav: add some documentation on classes 2024-05-23 17:00:46 +02:00
a57e6c0cc9
Dav: Introduce access control inside de dav controller 2024-05-23 17:00:45 +02:00
3fe870ba71
Dav: refactor WebdavController 2024-05-23 17:00:45 +02:00
6f6683f549
Dav: implements JWT extraction from the URL, and add the access_token in dav urls 2024-05-23 17:00:45 +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
20291026fb
release 2.19.0 2.19.0 2024-05-14 16:05:51 +02:00
d0e27d51fe fix path to doctrine-fixtures-bundles and prefix composer command by "symfony" 2024-05-13 13:20:08 +00:00
85d6765178 Merge branch '266-event-bundle-graphic' into 'master'
Resolve "Module évenements: finaliser les bugs graphiques"

Closes #266

See merge request Chill-Projet/chill-bundles!692
2024-05-08 08:57:42 +00:00
30955752c3 fix pipeline and add changie 2024-05-08 10:28:14 +02:00
f7f7e1cb1d updated translation by changing translation in twig 2024-05-08 10:05:58 +02:00
651c455bdf added translation for No item 2024-05-08 10:05:49 +02:00