From 25a928b80256f30e2c71ca20753f2fee0417f841 Mon Sep 17 00:00:00 2001 From: Surendra Reddy Katam Date: Mon, 17 Sep 2018 17:37:58 +0530 Subject: [PATCH] Sonar Major issues This block of commented-out lines of code should be removed Sonar Link: https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AWXX4Dp7ligbnTmNIX6R&resolved=false&severities=MAJOR Location: src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java Line No-L350 L355 L505 L515 Change-Id: Iadb3f456fa170c2430704f752eb6b741e2c8e56e Issue-ID: DMAAP-782 Signed-off-by: Surendra Reddy Katam --- src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java b/src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java index 29c7665..cef646e 100644 --- a/src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java +++ b/src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java @@ -347,12 +347,12 @@ public class TopicServiceImpl implements TopicService { if (user == null && null != dmaapContext.getRequest().getHeader("Authorization")) { LOGGER.info("Authenticating the user, as ACL authentication is not provided"); // String permission = - // "com.att.dmaap.mr.topic"+"|"+topicName+"|"+"manage"; + String permission = ""; String nameSpace = topicName.substring(0, topicName.lastIndexOf(".")); String mrFactoryVal = AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop, "msgRtr.topicfactory.aaf"); - // String tokens[] = topicName.split(".mr.topic."); + permission = mrFactoryVal + nameSpace + "|destroy"; DMaaPAAFAuthenticator aaf = new DMaaPAAFAuthenticatorImpl(); if (!aaf.aafAuthentication(dmaapContext.getRequest(), permission)) { @@ -502,7 +502,7 @@ public class TopicServiceImpl implements TopicService { // - // if(!aaf.aafAuthentication(dmaapContext.getRequest(), permission)) + // { // LOGGER.error("Failed to permit write access to producer [" + // producerId + "] for topic " + topicName @@ -512,7 +512,7 @@ public class TopicServiceImpl implements TopicService { // errorMessages.getNotPermitted1()+" - // throw new DMaaPAccessDeniedException(errRes); + // } // } -- 2.16.6