From ecd386adf0ed527af8a7c55be1afb5faed61b560 Mon Sep 17 00:00:00 2001 From: Ace Date: Thu, 19 May 2016 08:22:29 +0530 Subject: [PATCH] Fixing IOTS-160 --- .../devicemgt/app/pages/cdmf.page.user.edit/edit.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.js index ae091ec38c..982661fcd4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.js @@ -46,7 +46,15 @@ function onRequest(context) { } response = userModule.getRolesByUserStore(userStore); if (response["status"] == "success") { - page["userRoles"] = response["content"]; + var roleVals = response["content"]; + var filteredRoles = []; + var prefix = "Application"; + for (i = 0; i < roleVals.length; i++) { + if(roleVals[i].indexOf(prefix) < 0){ + filteredRoles.push(roleVals[i]); + } + } + page["userRoles"] = filteredRoles; } }