diff --git a/bauhaus-back-changeLog.txt b/bauhaus-back-changeLog.txt index 050c993f0..59b4e3b09 100644 --- a/bauhaus-back-changeLog.txt +++ b/bauhaus-back-changeLog.txt @@ -1,3 +1,4 @@ +3.0.3 : Mise à jour de spring-security + correction des droits de créations de documents/liens 3.0.2 : Corrections de l'url des documents à la publication 3.0.1 : Rétablissement du swagger et des droits d'accès 3.0.0 : Module Opérations diff --git a/pom.xml b/pom.xml index 1b7f74aed..f88dc696c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ fr.insee.rmes Bauhaus-BO war - 3.0.2 + 3.0.3 Bauhaus-Back-Office Back-office services for Bauhaus https://github.com/InseeFr/Bauhaus-Back-Office @@ -41,7 +41,7 @@ 3.5.0 2.0.9 4.3.30.RELEASE - 4.2.17.RELEASE + 4.2.20.RELEASE 2.13.3 5.7.0 UTF-8 diff --git a/src/main/java/fr/insee/rmes/config/swagger/SwaggerConfig.java b/src/main/java/fr/insee/rmes/config/swagger/SwaggerConfig.java index 3676bfd58..0f11febf8 100644 --- a/src/main/java/fr/insee/rmes/config/swagger/SwaggerConfig.java +++ b/src/main/java/fr/insee/rmes/config/swagger/SwaggerConfig.java @@ -30,7 +30,7 @@ public SwaggerConfig(@Context ServletConfig servletConfig) { super(); OpenAPI openApi = new OpenAPI(); - Info info = new Info().title("Bauhaus API").version("3.0.2").description("Rest Endpoints and services Integration used by Bauhaus"); + Info info = new Info().title("Bauhaus API").version("3.0.3").description("Rest Endpoints and services Integration used by Bauhaus"); openApi.info(info); Server server = new Server(); diff --git a/src/main/java/fr/insee/rmes/webservice/CodeListsResources.java b/src/main/java/fr/insee/rmes/webservice/CodeListsResources.java index d45251b16..61566ac2f 100644 --- a/src/main/java/fr/insee/rmes/webservice/CodeListsResources.java +++ b/src/main/java/fr/insee/rmes/webservice/CodeListsResources.java @@ -61,7 +61,7 @@ public Response getallCodesLists() { @GET @Path("/search") @Produces(MediaType.APPLICATION_JSON) - @Operation(operationId = "getDetailedCodesLisForSearch", summary = "List of codes", + @Operation(operationId = "getDetailedCodesListForSearch", summary = "Return all lists for Advanced Search", responses = { @ApiResponse(content = @Content(mediaType = "application/json", schema = @Schema(implementation = CodeList.class)))}) public Response getDetailedCodesLisForSearch() { String jsonResultat; diff --git a/src/main/java/fr/insee/rmes/webservice/DocumentsResources.java b/src/main/java/fr/insee/rmes/webservice/DocumentsResources.java index 7ed2c29aa..e44798699 100644 --- a/src/main/java/fr/insee/rmes/webservice/DocumentsResources.java +++ b/src/main/java/fr/insee/rmes/webservice/DocumentsResources.java @@ -133,7 +133,7 @@ public Response downloadDocument(@PathParam(Constants.ID) String id) { /** * Create a new document */ - @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_CONCEPTS_CONTRIBUTOR }) + @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_SERIES_CONTRIBUTOR, Roles.SPRING_INDICATOR_CONTRIBUTOR }) @POST @Path("/document") @Consumes({MediaType.MULTIPART_FORM_DATA, MediaType.APPLICATION_OCTET_STREAM, "application/vnd.oasis.opendocument.text",MediaType.APPLICATION_JSON }) @@ -158,7 +158,7 @@ public Response setDocument( /** * Update informations about a document */ - @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_CONCEPTS_CONTRIBUTOR }) + @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_SERIES_CONTRIBUTOR, Roles.SPRING_INDICATOR_CONTRIBUTOR }) @PUT @Path("/document/{id}") @Consumes(MediaType.APPLICATION_JSON) @@ -181,7 +181,7 @@ public Response setDocument( /** * Change the file of a document */ - @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_CONCEPTS_CONTRIBUTOR }) + @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_SERIES_CONTRIBUTOR, Roles.SPRING_INDICATOR_CONTRIBUTOR }) @PUT @Path("/document/{id}/file") @Consumes({MediaType.MULTIPART_FORM_DATA, MediaType.APPLICATION_OCTET_STREAM, "application/vnd.oasis.opendocument.text",MediaType.APPLICATION_JSON }) @@ -205,7 +205,7 @@ public Response changeDocument( /** * Delete a document */ - @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_CONCEPTS_CONTRIBUTOR }) + @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_SERIES_CONTRIBUTOR, Roles.SPRING_INDICATOR_CONTRIBUTOR }) @DELETE @Path("/document/{id}") @Operation(operationId = "deleteDocument", summary = "Delete a document") @@ -247,7 +247,7 @@ public Response getLink(@PathParam(Constants.ID) String id) { /** * Create a new link */ - @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_CONCEPTS_CONTRIBUTOR }) + @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_SERIES_CONTRIBUTOR, Roles.SPRING_INDICATOR_CONTRIBUTOR }) @POST @Path("/link") @Consumes({MediaType.MULTIPART_FORM_DATA, MediaType.APPLICATION_OCTET_STREAM, "application/vnd.oasis.opendocument.text",MediaType.APPLICATION_JSON }) @@ -268,7 +268,7 @@ public Response setLink( /** * Update informations about a link */ - @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_CONCEPTS_CONTRIBUTOR }) + @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_SERIES_CONTRIBUTOR, Roles.SPRING_INDICATOR_CONTRIBUTOR }) @PUT @Path("/link/{id}") @Consumes(MediaType.APPLICATION_JSON) @@ -289,7 +289,7 @@ public Response setLink( /** * Delete a link */ - @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_CONCEPTS_CONTRIBUTOR }) + @Secured({ Roles.SPRING_ADMIN, Roles.SPRING_SERIES_CONTRIBUTOR, Roles.SPRING_INDICATOR_CONTRIBUTOR }) @DELETE @Path("/link/{id}") @Operation(operationId = "deleteLink", summary = "Delete a link") diff --git a/src/main/resources/request/codes-list/getDetailedCodesList.ftlh b/src/main/resources/request/codes-list/getDetailedCodesList.ftlh index d6fd31761..bb22a4683 100644 --- a/src/main/resources/request/codes-list/getDetailedCodesList.ftlh +++ b/src/main/resources/request/codes-list/getDetailedCodesList.ftlh @@ -2,14 +2,29 @@ SELECT DISTINCT ?id ?labelLg1 ?labelLg2 ?created ?modified ?creator ?contributor FROM <${CODES_LISTS_GRAPH}> WHERE { ?list skos:notation '${NOTATION}' ; - skos:notation ?id ; - dcterms:created ?created ; - dcterms:modified ?modified ; - dc:creator ?creator ; - insee:validationState ?validationState ; - insee:disseminationStatus ?disseminationStatus ; + skos:notation ?id . - dcterms:modified ?modified . + OPTIONAL { + ?list dcterms:created ?created . + } + OPTIONAL { + ?list dc:creator ?creator . + } + OPTIONAL { + ?list dc:contributor ?contributor . + } + OPTIONAL { + ?list insee:validationState ?validationState . + } + OPTIONAL { + ?list insee:disseminationStatus ?disseminationStatus . + } + OPTIONAL { + ?list dc:contributor ?contributor . + } + OPTIONAL { + ?list dcterms:modified ?modified . + } ?list skos:prefLabel ?labelLg1 . FILTER(lang(?labelLg1) = '${LG1}') . OPTIONAL {?list skos:prefLabel ?labelLg2 .