From 6e1fb3bf4383441055327ac621ae7745709b39b5 Mon Sep 17 00:00:00 2001 From: Eric Santos Date: Tue, 23 Feb 2021 18:53:07 -0500 Subject: Pass roles at delete method Issue-ID: AAI-3290 Signed-off-by: Santos, Eric Change-Id: If7f3aa4977230150cb9315b99c6e0eaad155aa10 --- aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'aai-resources') diff --git a/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java index d22252a..c9991cc 100644 --- a/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java +++ b/aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java @@ -317,7 +317,7 @@ public class LegacyMoxyConsumer extends RESTAPI { @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public Response delete (@PathParam("version")String versionParam, @PathParam("uri") @Encoded String uri, @Context HttpHeaders headers, @Context UriInfo info, @QueryParam("resource-version")String resourceVersion, @Context HttpServletRequest req) { - + Set roles = getRoles(req.getUserPrincipal(), req.getMethod()); String outputMediaType = getMediaType(headers.getAcceptableMediaTypes()); String sourceOfTruth = headers.getRequestHeaders().getFirst("X-FromAppId"); String transId = headers.getRequestHeaders().getFirst("X-TransactionId"); @@ -346,7 +346,7 @@ public class LegacyMoxyConsumer extends RESTAPI { DBRequest request = new DBRequest.Builder(HttpMethod.DELETE, uriObject, uriQuery, obj, headers, info, transId).build(); List requests = new ArrayList<>(); requests.add(request); - Pair>> responsesTuple = traversalUriHttpEntry.process(requests, sourceOfTruth); + Pair>> responsesTuple = traversalUriHttpEntry.process(requests, sourceOfTruth, roles); response = responsesTuple.getValue1().get(0).getValue1(); success = responsesTuple.getValue0(); -- cgit 1.2.3-korg