summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/openecomp
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main/java/org/openecomp')
-rwxr-xr-xvid-app-common/src/main/java/org/openecomp/vid/controller/VidController.java3
-rw-r--r--vid-app-common/src/main/java/org/openecomp/vid/roles/RoleProvider.java8
-rw-r--r--vid-app-common/src/main/java/org/openecomp/vid/roles/RoleValidator.java1
3 files changed, 8 insertions, 4 deletions
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/VidController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/VidController.java
index aac3a0b7e..f21036eb3 100755
--- a/vid-app-common/src/main/java/org/openecomp/vid/controller/VidController.java
+++ b/vid-app-common/src/main/java/org/openecomp/vid/controller/VidController.java
@@ -73,7 +73,8 @@ public class VidController extends RestrictedBaseController {
Map<String, String[]> requestParams = request.getParameterMap();
List<Role> roles = new RoleProvider().getUserRoles(request);
secureServices.setServices(service.getServices(requestParams));
- secureServices.setReadOnly(roleProvider.userPermissionIsReadOnly(roles));
+ //Disable roles until AAF integration finishes
+ //secureServices.setReadOnly(roleProvider.userPermissionIsReadOnly(roles));
return secureServices;
} catch (AsdcCatalogException e) {
LOG.error("Failed to retrieve service definitions from SDC", e);
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleProvider.java b/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleProvider.java
index 99645a105..2ed5bdbbf 100644
--- a/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleProvider.java
+++ b/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleProvider.java
@@ -15,6 +15,7 @@ public class RoleProvider {
private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(RoleProvider.class);
final String readPermissionString = "read";
+ final String roleStringDelimiter = "_";
public static List<String> extractRoleFromSession(HttpServletRequest request) {
@@ -24,7 +25,8 @@ public class RoleProvider {
public List<Role> getUserRoles(HttpServletRequest request) {
List<Role> roleList = new ArrayList<>();
- HashMap roles = UserUtils.getRoles(request);
+ //Disable roles until AAF integration finishes
+ /*HashMap roles = UserUtils.getRoles(request);
for (Object role : roles.keySet()) {
org.openecomp.portalsdk.core.domain.Role sdkRol = (org.openecomp.portalsdk.core.domain.Role) roles.get(role);
try {
@@ -36,13 +38,13 @@ public class RoleProvider {
LOG.error("Failed to parse permission", e);
}
- }
+ }*/
return roleList;
}
public String[] splitRole(String roleAsString) {
- return roleAsString.split("_");
+ return roleAsString.split(roleStringDelimiter);
}
public boolean userPermissionIsReadOnly(List<Role> roles) {
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleValidator.java b/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleValidator.java
index a7085e596..9031524d3 100644
--- a/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleValidator.java
+++ b/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleValidator.java
@@ -10,6 +10,7 @@ import java.util.Map;
*/
public class RoleValidator {
+ //Disable roles until AAF integration finishes
private boolean disableRoles = true;
private List<Role> userRoles;