From b3075cf1bc6b4c6aa38e93cae915edb9c32d8ba9 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sat, 14 May 2016 00:10:39 +0530 Subject: [PATCH] removing application related roles --- .../org/wso2/carbon/device/mgt/jaxrs/api/impl/RoleImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/impl/RoleImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/impl/RoleImpl.java index 278a7dfd26..3b9c8420fb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/impl/RoleImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/api/impl/RoleImpl.java @@ -438,10 +438,10 @@ public class RoleImpl implements org.wso2.carbon.device.mgt.jaxrs.api.Role { String msg = "Error occurred while retrieving the list of user roles."; throw new MDMAPIException(msg, e); } - // removing all internal roles and roles created for Service-providers + // removing all internal roles, roles created for Service-providers and application related roles. List filteredRoles = new ArrayList<>(); for (String role : roles) { - if (!(role.startsWith("Internal/") || role.startsWith("Authentication/"))) { + if (!(role.startsWith("Internal/") || role.startsWith("Authentication/") || role.startsWith("Application/"))) { filteredRoles.add(role); } }