diff options
Diffstat (limited to 'vid-app-common')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/controllers/VidController.java | 4 | ||||
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controllers/VidController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/VidController.java index 6d6ffb31b..3a3acd8ee 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controllers/VidController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/VidController.java @@ -106,9 +106,7 @@ public class VidController extends RestrictedBaseController { SecureServices secureServices = new SecureServices(); List<Role> roles = roleProvider.getUserRoles(request); secureServices.setServices(aaiService.getServicesByDistributionStatus()); - //Disable roles until AAF integration finishes - //secureServices.setReadOnly(roleProvider.userPermissionIsReadOnly(roles)); - secureServices.setReadOnly(false); + secureServices.setReadOnly(roleProvider.userPermissionIsReadOnly(roles)); return secureServices; } catch (Exception t) { diff --git a/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java b/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java index 45835d459..b268c98ce 100644 --- a/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java +++ b/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java @@ -51,10 +51,10 @@ public class RoleProvider { LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Entering to get user role for user " + UserUtils.getUserId(request)); List<Role> roleList = new ArrayList<>(); - //Disable roles until AAF integration finishes - /*HashMap roles = UserUtils.getRoles(request); + + Map 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); + org.onap.portalsdk.core.domain.Role sdkRol = (org.onap.portalsdk.core.domain.Role) roles.get(role); LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Role " + sdkRol.getName() + " is being proccessed"); try { @@ -71,7 +71,7 @@ public class RoleProvider { LOG.error(logPrefix + " Failed to parse permission"); } - }*/ + } return roleList; } |