stable
Clone or download
Given the current user can read an artidoc document, then the REST API will allow to retrieve the content of the document. `GET /artidoc/:id/sections` where `:id` is the id of the document. The route will return the list of sections, composed by an artifact representation. This list is paginated, client will have to do many calls to retrieve the whole content. In order to keep the returned result light, the tracker definition is not returned in each artifact representation. It will be injected in the application or an additional REST call will have to be done by the client in order to be able to find the relevant information to compose the document. In order to test this patch you will have to hack the database. In the new table `plugin_artidoc_document` insert entries (list of artifact id with an arbitrary rank for an artidoc document). If one of the artifact in the document is not readable by the current user, then the current call will get a 404. Part of story #37542: display a read only Document Change-Id: Ie18a070c10b29a3f613458d3c54d3eebeb73d2f1
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/artidoc/composer.json | +1 | −1 | Go to diff View file |
A | plugins/artidoc/db/install.sql | +8 | −0 | Go to diff View file |
A | plugins/artidoc/db/mysql/2024/202404041430_add_artidoc_document_table.php | +46 | −0 | Go to diff View file |
A | plugins/artidoc/db/uninstall.sql | +1 | −0 | Go to diff View file |
M | plugins/artidoc/include/Artidoc/ArtidocController.php | +2 | −2 | Go to diff View file |
M | plugins/artidoc/include/Artidoc/Document/ArtidocDao.php | +24 | −1 | Go to diff View file |
M | plugins/artidoc/include/Artidoc/Document/ArtidocRetriever.php | +1 | −1 | Go to diff View file |
A | plugins/artidoc/include/Artidoc/Document/PaginatedRawSections.php | +33 | −0 | Go to diff View file |
R | plugins/artidoc/include/Artidoc/Document/RetriveArtidoc.php | Go to diff View file | ||
A | plugins/artidoc/include/Artidoc/Document/SearchPaginatedRawSections.php | +26 | −0 | Go to diff View file |
A | plugins/artidoc/include/Artidoc/REST/ResourcesInjector.php | +36 | −0 | Go to diff View file |
A | plugins/artidoc/include/Artidoc/REST/v1/ArtidocResource.php | +135 | −0 | Go to diff View file |
A | plugins/artidoc/include/Artidoc/REST/v1/ArtidocSectionRepresentation.php | +35 | −0 | Go to diff View file |
A | plugins/artidoc/include/Artidoc/REST/v1/PaginatedArtidocSectionRepresentationCollection.php | +33 | −0 | Go to diff View file |
A | plugins/artidoc/include/Artidoc/REST/v1/PaginatedArtidocSectionRepresentationCollectionBuilder.php | +51 | −0 | Go to diff View file |
A | plugins/artidoc/include/Artidoc/REST/v1/RawSectionsToRepresentationTransformer.php | +121 | −0 | Go to diff View file |
A | plugins/artidoc/include/Artidoc/REST/v1/TransformRawSectionsToRepresentation.php | +34 | −0 | Go to diff View file |
M | plugins/artidoc/include/artidocPlugin.php | +9 | −0 | Go to diff View file |
A | plugins/artidoc/tests/integration/Artidoc/Document/ArtidocDaoTest.php | +92 | −0 | Go to diff View file |
A | plugins/artidoc/tests/rest/Artidoc/ArtidocTest.php | +36 | −0 | Go to diff View file |
A | plugins/artidoc/tests/unit/Artidoc/REST/v1/PaginatedArtidocSectionRepresentationCollectionBuilderTest.php | +125 | −0 | Go to diff View file |
A | plugins/artidoc/tests/unit/Artidoc/REST/v1/RawSectionsToRepresentationTransformerTest.php | +197 | −0 | Go to diff View file |
A | plugins/artidoc/tests/unit/Artidoc/Stubs/Document/RetrieveArtidocStub.php | +55 | −0 | Go to diff View file |
A | plugins/artidoc/tests/unit/Artidoc/Stubs/Document/SearchPaginatedRawSectionsStub.php | +52 | −0 | Go to diff View file |
A | plugins/artidoc/tests/unit/Artidoc/Stubs/Document/TransformRawSectionsToRepresentationStub.php | +65 | −0 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Tracker_ArtifactFactory.class.php | +1 | −1 | Go to diff View file |
M | tests/integration/bin/setup.sh | +1 | −0 | Go to diff View file |
M | tests/rest/bin/setup.sh | +1 | −0 | Go to diff View file |