diff options
author | Ofir Sonsino <os0695@att.com> | 2017-10-04 12:32:47 +0300 |
---|---|---|
committer | Ofir Sonsino <os0695@att.com> | 2017-10-04 12:47:11 +0300 |
commit | 13b38dbfdcc4f16bfe9e7179940304aa3a351076 (patch) | |
tree | 48adf857306df73031a6ec432b490b4482409a6a /vid-app-common/src/main/java | |
parent | d33c93a3f8c0104f2a724fc1d1ff2c130eeaaf26 (diff) |
get service models from SDC - Fix
Change-Id: I936482305790ca9b01ad5d9c8c804cb8df814f91
Issue-ID: VID-74
Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'vid-app-common/src/main/java')
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; |