summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Santos <eric.santos@yoppworks.com>2021-02-23 18:53:07 -0500
committerEric Santos <eric.santos@yoppworks.com>2021-02-23 18:53:07 -0500
commit6e1fb3bf4383441055327ac621ae7745709b39b5 (patch)
treea518103247c6a03cf7288a24c1f84a2d6b05d471
parentacf6cddf4897dc6718288910837618d6d06a4f64 (diff)
Pass roles at delete method
Issue-ID: AAI-3290 Signed-off-by: Santos, Eric <eric.santos@yoppworks.com> Change-Id: If7f3aa4977230150cb9315b99c6e0eaad155aa10
-rw-r--r--aai-resources/src/main/java/org/onap/aai/rest/LegacyMoxyConsumer.java4
1 files changed, 2 insertions, 2 deletions
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<String> 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<DBRequest> requests = new ArrayList<>();
requests.add(request);
- Pair<Boolean, List<Pair<URI, Response>>> responsesTuple = traversalUriHttpEntry.process(requests, sourceOfTruth);
+ Pair<Boolean, List<Pair<URI, Response>>> responsesTuple = traversalUriHttpEntry.process(requests, sourceOfTruth, roles);
response = responsesTuple.getValue1().get(0).getValue1();
success = responsesTuple.getValue0();