From 1cfcc3a599d65e941095530671ea1af06e15f018 Mon Sep 17 00:00:00 2001 From: n-jay Date: Mon, 12 Mar 2018 14:27:12 +0530 Subject: [PATCH 1/5] Added iOS DEP API scopes in UI config file --- .../main/resources/jaggeryapps/devicemgt/app/conf/config.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 6a59e99d0fa..3dcaa53dcf8 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 @@ -153,7 +153,9 @@ "perm:admin:device-type", "perm:device:enroll", "perm:geo-service:analytics-view", - "perm:geo-service:alerts-manage" + "perm:geo-service:alerts-manage", + "perm:ios:dep-add", + "perm:ios:dep-view" ], "isOAuthEnabled": true, "backendRestEndpoints": { From fedd2a32579797f3335bfe496841eed2fa35981c Mon Sep 17 00:00:00 2001 From: n-jay Date: Mon, 12 Mar 2018 14:28:24 +0530 Subject: [PATCH 2/5] Added iOS DEP management page to navbar --- .../app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs index 886bb4ccbef..3479a9772be 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs @@ -120,6 +120,11 @@ Certificate Configurations +
  • + + DEP Configurations + +
  • From 280a63bdbda010534d8f28362dc34d4cd9de1111 Mon Sep 17 00:00:00 2001 From: n-jay Date: Tue, 13 Mar 2018 15:13:22 +0530 Subject: [PATCH 3/5] Remove UI API scopes from config file --- .../main/resources/jaggeryapps/devicemgt/app/conf/config.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 3dcaa53dcf8..6a59e99d0fa 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 @@ -153,9 +153,7 @@ "perm:admin:device-type", "perm:device:enroll", "perm:geo-service:analytics-view", - "perm:geo-service:alerts-manage", - "perm:ios:dep-add", - "perm:ios:dep-view" + "perm:geo-service:alerts-manage" ], "isOAuthEnabled": true, "backendRestEndpoints": { From 43feaf7bc7d73a9f2754b6ed18d59e1543ba0c21 Mon Sep 17 00:00:00 2001 From: n-jay Date: Wed, 14 Mar 2018 10:56:47 +0530 Subject: [PATCH 4/5] Add DEP management icon to navmenu The DEP management page is formed once the iOS plugin has been deployed within the IoT Home. Till then, any functionality with regards to DEP management is not present within the server. An icon in the navmenu allows users to access the DEP management page. This commit includes the feature where the navmenu detects if the iOS plugin has been deployed and accordingly displays the icon to access the DEP management page. --- .../units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs | 12 +++++++----- .../units/cdmf.unit.ui.navbar.nav-menu/nav-menu.js | 12 ++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs index 3479a9772be..134da44a3e0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs @@ -120,11 +120,13 @@ Certificate Configurations -
  • - - DEP Configurations - -
  • + {{#unless iosPluginFlag}} +
  • + + DEP Configurations + +
  • + {{/unless}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.js index 69e306f590c..eda5f28ff74 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.js @@ -28,6 +28,7 @@ function onRequest(context) { } }); var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; + var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var mdmProps = require("/app/modules/conf-reader/main.js")["conf"]; var constants = require("/app/modules/constants.js"); var uiPermissions = userModule.getUIPermissions(); @@ -41,6 +42,17 @@ function onRequest(context) { "device-mgt": [] }; + var typesListResponse = deviceModule.getDeviceTypesConfig(); + var temp = []; + temp = typesListResponse["content"]; + var iosPluginFlag = false; + temp.forEach(function(element) { + if (element["name"] == "ios") { + iosPluginFlag = true; + } + }); + context["iosPluginFlag"] = iosPluginFlag; + // following context.link value comes here based on the value passed at the point // where units are attached to a page zone. // eg: {{unit "appbar" pageLink="users" title="User Management"}} From 84c683a02b36ed2f6712f3e8680e73e2223bc2fc Mon Sep 17 00:00:00 2001 From: n-jay Date: Wed, 14 Mar 2018 11:03:37 +0530 Subject: [PATCH 5/5] Edit nav-menu to include change DEP management page visibility logic --- .../app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs index 134da44a3e0..9a1d868decc 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs @@ -120,13 +120,13 @@ Certificate Configurations - {{#unless iosPluginFlag}} + {{#if iosPluginFlag}}
  • DEP Configurations
  • - {{/unless}} + {{/if}}