From 6a0c0cb299416a2b9a3f8e94b6708845a5b435a4 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 2 Mar 2017 20:27:32 +0530 Subject: [PATCH] added default permissions --- .../resources/jaggeryapps/devicemgt/app/conf/app-conf.json | 2 +- .../devicemgt/app/modules/business-controllers/user.js | 2 +- .../main/resources/jaggeryapps/devicemgt/app/modules/init.js | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json index 6171219bb9d..4be20160d38 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json @@ -30,7 +30,7 @@ "enabled": true, "issuer" : "devicemgt", "appName" : "devicemgt", - "identityProviderUrl" : "https://%carbon.local.ip%:%iot.keymanager.https.port%/samlsso", + "identityProviderUrl" : "https://%iot.keymanager.host%:%iot.keymanager.https.port%/samlsso", "acs": "https://%iot.manager.host%:%iot.manager.https.port%/devicemgt/uuf/sso/acs", "identityAlias": "wso2carbon", "responseSigningEnabled" : true, 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 8de168cceae..d1b28389857 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 @@ -511,7 +511,7 @@ var userModule = function () { permissions["LIST_DEVICES"] = true; permissions["LIST_OWN_DEVICES"] = true; } - if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/owning-device")) { + if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/owning-device/view")) { permissions["LIST_OWN_DEVICES"] = true; } if (publicMethods.isAuthorized("/permission/admin/device-mgt/admin/groups/view")) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js index 457e4e1b08e..beaa90c56b2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js @@ -30,7 +30,10 @@ application.put("carbonServer", carbonServer); var permissions = { "/permission/admin/Login": ["ui.execute"], - "/permission/admin/device-mgt/device/api/subscribe": ["ui.execute"] + "/permission/admin/device-mgt/device/api/subscribe": ["ui.execute"], + "/permission/admin/device-mgt/devices/enroll": ["ui.execute"], + "/permission/admin/device-mgt/devices/disenroll": ["ui.execute"], + "/permission/admin/device-mgt/devices/owning-device/view": ["ui.execute"] }; var adminPermissions = {