diff options
Diffstat (limited to 'vid-app-common/src/main/java')
-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 | 10 |
2 files changed, 6 insertions, 8 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 39a1f2bf5..b9d67b6df 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 @@ -71,9 +71,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; } 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 90b9a8250..5c1ee9e89 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 @@ -69,10 +69,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 { @@ -85,11 +85,11 @@ public class RoleProvider { roleList.add(createRoleFromStringArr(roleParts, logPrefix)); String msg = String.format(logPrefix + " User %s got permissions %s", UserUtils.getUserId(request), Arrays.toString(roleParts)); LOG.debug(EELFLoggerDelegate.debugLogger, msg); - } catch (RoleParsingException e) { + } catch (Exception e) { LOG.error(logPrefix + " Failed to parse permission"); } - }*/ + } return roleList; } |