summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js4
4 files changed, 10 insertions, 6 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;
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
index a0030889a..8844d40a8 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js
@@ -39,8 +39,8 @@
$http.get(pathQuery)
.then(function successCallback(response) {
$scope.services = [];
- if (angular.isArray(response.data)) {
- wholeData = response.data;
+ if (response.data && angular.isArray(response.data.services)) {
+ wholeData = response.data.services;
$scope.services = $scope.filterDataWithHigerVersion(wholeData);
$scope.viewPerPage=10;
$scope.totalPage=$scope.services.length/$scope.viewPerPage;