Skip to content

Commit

Permalink
Merge pull request #130 from InseeFr/acceptance
Browse files Browse the repository at this point in the history
Acceptance
  • Loading branch information
alicela authored May 11, 2021
2 parents ff78a4d + 11369e3 commit 71be8ae
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 18 deletions.
1 change: 1 addition & 0 deletions bauhaus-back-changeLog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>fr.insee.rmes</groupId>
<artifactId>Bauhaus-BO</artifactId>
<packaging>war</packaging>
<version>3.0.2</version>
<version>3.0.3</version>
<name>Bauhaus-Back-Office</name>
<description>Back-office services for Bauhaus</description>
<url>https://github.com/InseeFr/Bauhaus-Back-Office</url>
Expand Down Expand Up @@ -41,7 +41,7 @@
<rdf4j.version>3.5.0</rdf4j.version>
<swagger.core.version>2.0.9</swagger.core.version>
<spring.version>4.3.30.RELEASE</spring.version>
<spring.security.version>4.2.17.RELEASE</spring.security.version>
<spring.security.version>4.2.20.RELEASE</spring.security.version>
<log4j2.version>2.13.3</log4j2.version>
<junit.version>5.7.0</junit.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/fr/insee/rmes/webservice/DocumentsResources.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand All @@ -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)
Expand All @@ -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 })
Expand All @@ -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")
Expand Down Expand Up @@ -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 })
Expand All @@ -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)
Expand All @@ -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")
Expand Down
29 changes: 22 additions & 7 deletions src/main/resources/request/codes-list/getDetailedCodesList.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down

0 comments on commit 71be8ae

Please sign in to comment.