summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-common
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-09-25 15:52:24 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-09-25 15:53:55 -0400
commit3a2b5c60384feb490e878020bdb9c01f514d7856 (patch)
tree840d02d1090640b08aa481f52d3385ad92552991 /ecomp-sdk/epsdk-app-common
parent65c475eb72271f674f5ec4502fa67fd972344543 (diff)
Sonar Scans and Role Centralization; clean nl
PORTAL-21: centralized user role management PORTAL-72: Address Sonar Scan code issues for ONAP - mostly on raptor PORTAL-86: ONAP - Remove internal att.com usages from tests and otherfiles PORTAL-90: Add debug statements to demo app's class; no functional change Issue: PORTAL-21 PORTAL-72 PORTAL-86 PORTAL-90 Change-Id: I72a6c812009f51446330bf42bab6d3338d053805 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-common')
-rw-r--r--ecomp-sdk/epsdk-app-common/README.md2
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java11
2 files changed, 8 insertions, 5 deletions
diff --git a/ecomp-sdk/epsdk-app-common/README.md b/ecomp-sdk/epsdk-app-common/README.md
index e3cb67c0..1823262f 100644
--- a/ecomp-sdk/epsdk-app-common/README.md
+++ b/ecomp-sdk/epsdk-app-common/README.md
@@ -29,6 +29,8 @@ Version 1.4.0
- PORTAL-42 Use OParent as parent POM
- PORTAL-72 Address Sonar Scan code issues
- PORTAL-90 Use approved ONAP license text
+- Portal-86 Remove application specific usages from tests and other files
+
Version 1.3.0, 28 August 2017
- Portal-19 Renaming the Group Id in the POM file to org.onap.portal.sdk
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java
index b1377007..69a25e66 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/RoleController.java
@@ -42,6 +42,7 @@ import java.io.PrintWriter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.TreeSet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -176,13 +177,13 @@ public class RoleController extends RestrictedBaseController {
domainRole.addChildRole((Role) childRole);
}
}
- if (role.getRoleFunctions() != null && role.getRoleFunctions().size() > 0) {
- for (Object roleFunction : roleFunctions) {
- domainRole.addRoleFunction((RoleFunction) roleFunction);
- }
+ }
+ if (role.getRoleFunctions() != null && role.getRoleFunctions().size() > 0) {
+ domainRole.setRoleFunctions(new TreeSet());
+ for (Object roleFunction : roleFunctions) {
+ domainRole.addRoleFunction((RoleFunction) roleFunction);
}
}
-
roleService.saveRole(user.getOrgUserId(), domainRole);
String responseString = mapper.writeValueAsString(domainRole);