[DEV] remove seurity that is not working

This commit is contained in:
Edouard DUPIN 2022-05-22 01:02:53 +02:00
parent a958602dd2
commit 3ad7a07616
3 changed files with 8 additions and 5 deletions

View File

@ -329,7 +329,7 @@ public class DataResource {
@POST
@Path("/upload/")
@Consumes({MediaType.MULTIPART_FORM_DATA})
@RolesAllowed("USER")
//@RolesAllowed("USER")
public Response uploadFile(@Context SecurityContext sc, @FormDataParam("file") InputStream fileInputStream, @FormDataParam("file") FormDataContentDisposition fileMetaData) {
GenericContext gc = (GenericContext) sc.getUserPrincipal();
System.out.println("===================================================");
@ -351,7 +351,7 @@ public class DataResource {
//@Secured
@GET
@Path("{id}")
@RolesAllowed("USER")
//@RolesAllowed("USER")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
public Response retriveDataId(@Context SecurityContext sc, @HeaderParam("Range") String range, @PathParam("id") Long id) throws Exception {
GenericContext gc = (GenericContext) sc.getUserPrincipal();
@ -370,7 +370,7 @@ public class DataResource {
//@Secured
@GET
@Path("thumbnail/{id}")
@RolesAllowed("USER")
//@RolesAllowed("USER")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
public Response retriveDataThumbnailId(@Context SecurityContext sc, @HeaderParam("Range") String range, @PathParam("id") Long id) throws Exception {
GenericContext gc = (GenericContext) sc.getUserPrincipal();
@ -417,7 +417,7 @@ public class DataResource {
//@Secured
@GET
@Path("{id}/{name}")
@RolesAllowed("USER")
//@RolesAllowed("USER")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
public Response retriveDataFull(@Context SecurityContext sc, @HeaderParam("Range") String range, @PathParam("id") Long id, @PathParam("name") String name) throws Exception {
GenericContext gc = (GenericContext) sc.getUserPrincipal();

View File

@ -47,7 +47,7 @@ export class DataService {
return this.http.requestImage({
endPoint: this.serviceName + "/thumbnail/" + _id,
requestType: HTTPRequestModel.GET,
accept: HTTPMimeType.IMAGE,
accept: HTTPMimeType.ALL,//IMAGE,
contentType: HTTPMimeType.JSON,
});
}

View File

@ -86,6 +86,9 @@ export class HttpWrapperService {
'Content-Type': properties.contentType,
'authorization': properties.authorization,
}
/*if (properties.requestType === HTTPRequestModel.GET) {
headers['Content-Type'] = undefined;
}*/
console.log(`disble tocken : ${JSON.stringify(properties)} properties.disableTocken=${properties.disableTocken}`);
if (properties.disableTocken === undefined || properties.disableTocken === null || properties.disableTocken === true) {
headers = this.addTokenIfNeeded(headers);