From 8ca85f1177a4be2cb2289ce916f77e0cdad964e8 Mon Sep 17 00:00:00 2001 From: Supun94 Date: Fri, 28 Apr 2017 03:11:48 +0530 Subject: [PATCH] Adding UI permissions for topics view --- .../main/resources/jaggeryapps/devicemgt/app/conf/config.json | 1 + .../devicemgt/app/modules/business-controllers/user.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index f6120a5c146..b8934f0f164 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -64,6 +64,7 @@ "scopes": [ "perm:sign-csr", "perm:admin:devices:view", + "perm:admin:topics:view", "perm:roles:add", "perm:roles:add-users", "perm:roles:update", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js index f8c420d58c6..0666bb653d4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js @@ -615,6 +615,9 @@ var userModule = function () { if (publicMethods.isAuthorized("/permission/admin/device-mgt")) { permissions["IS_ADMIN"] = true; } + if (publicMethods.isAuthorized("/permission/admin/device-mgt/topics/view")) { + permissions["VIEW_TOPICS"] = true; + } return permissions; };