From d9a449dd265e922ce5bc9b3aa7a39975f44e7be7 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Wed, 23 Nov 2016 12:36:05 +0530 Subject: [PATCH 01/20] adding modify enrollment capability to save chnages in enrollment such as GCM token update --- .../impl/DeviceManagementServiceImpl.java | 59 ++++++++++++++----- .../impl/dao/impl/AndroidDeviceDAOImpl.java | 6 +- .../impl/util/AndroidPluginConstants.java | 2 +- 3 files changed, 47 insertions(+), 20 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java index ddcf2a49d0..2117cccec7 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java @@ -276,25 +276,52 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { @Path("/{id}") @Override public Response modifyEnrollment(@PathParam("id") String id, @Valid AndroidDevice androidDevice) { - Device device = new Device(); - String msg = ""; - device.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID); - if(androidDevice.getEnrolmentInfo().getDateOfEnrolment() <= 0){ - msg = "Invalid Enrollment date."; - return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); + Device device; + DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); + deviceIdentifier.setId(androidDevice.getDeviceIdentifier()); + deviceIdentifier.setType(AndroidConstants.DEVICE_TYPE_ANDROID); + try { + device = AndroidAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier); + } catch (DeviceManagementException e) { + String msg = "Error occurred while getting enrollment details of the Android device that carries the id '" + + id + "'"; + log.error(msg, e); + throw new UnexpectedServerErrorException( + new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()); } - if(androidDevice.getEnrolmentInfo().getDateOfLastUpdate() <= 0){ - msg = "Invalid Last Updated date."; - return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); + + if (androidDevice == null) { + String errorMessage = "The payload of the android device enrollment is incorrect."; + log.error(errorMessage); + throw new org.wso2.carbon.mdm.services.android.exception.BadRequestException( + new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); + } + if (device == null) { + String errorMessage = "The device to be modified doesn't exist."; + log.error(errorMessage); + throw new org.wso2.carbon.mdm.services.android.exception.BadRequestException( + new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); + } + if(androidDevice.getEnrolmentInfo() != null){ + device.setEnrolmentInfo(device.getEnrolmentInfo()); } - device.setEnrolmentInfo(androidDevice.getEnrolmentInfo()); device.getEnrolmentInfo().setOwner(AndroidAPIUtils.getAuthenticatedUser()); - device.setDeviceInfo(androidDevice.getDeviceInfo()); + if(androidDevice.getDeviceInfo() != null) { + device.setDeviceInfo(androidDevice.getDeviceInfo()); + } device.setDeviceIdentifier(androidDevice.getDeviceIdentifier()); - device.setDescription(androidDevice.getDescription()); - device.setName(androidDevice.getName()); - device.setFeatures(androidDevice.getFeatures()); - device.setProperties(androidDevice.getProperties()); + if(androidDevice.getDescription() != null) { + device.setDescription(androidDevice.getDescription()); + } + if(androidDevice.getName() != null) { + device.setName(androidDevice.getName()); + } + if(androidDevice.getFeatures() != null) { + device.setFeatures(androidDevice.getFeatures()); + } + if(androidDevice.getProperties() != null) { + device.setProperties(androidDevice.getProperties()); + } boolean result; try { device.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID); @@ -313,7 +340,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { return Response.status(Response.Status.NOT_MODIFIED).entity(responseMessage).build(); } } catch (DeviceManagementException e) { - msg = "Error occurred while modifying enrollment of the Android device that carries the id '" + + String msg = "Error occurred while modifying enrollment of the Android device that carries the id '" + id + "'"; log.error(msg, e); throw new UnexpectedServerErrorException( diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/dao/impl/AndroidDeviceDAOImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/dao/impl/AndroidDeviceDAOImpl.java index 2fa63e5bc4..c033a8c478 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/dao/impl/AndroidDeviceDAOImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/dao/impl/AndroidDeviceDAOImpl.java @@ -159,7 +159,7 @@ public class AndroidDeviceDAOImpl implements MobileDeviceDAO{ stmt.setString(2, properties.get(AndroidPluginConstants.DEVICE_INFO)); stmt.setString(3, mobileDevice.getSerial()); stmt.setString(4, mobileDevice.getVendor()); - stmt.setString(5, mobileDevice.getMobileDeviceId()); + stmt.setString(5, properties.get(AndroidPluginConstants.MAC_ADDRESS)); stmt.setString(6, properties.get(AndroidPluginConstants.DEVICE_NAME)); stmt.setString(7, mobileDevice.getLatitude()); stmt.setString(8, mobileDevice.getLongitude()); @@ -167,8 +167,8 @@ public class AndroidDeviceDAOImpl implements MobileDeviceDAO{ stmt.setString(10, mobileDevice.getImsi()); stmt.setString(11, mobileDevice.getOsVersion()); stmt.setString(12, mobileDevice.getModel()); - stmt.setString(13, mobileDevice.getMobileDeviceId()); - stmt.setString(14, mobileDevice.getOsBuildDate()); + stmt.setString(13, mobileDevice.getOsBuildDate()); + stmt.setString(14, mobileDevice.getMobileDeviceId()); int rows = stmt.executeUpdate(); if (rows > 0) { status = true; diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/util/AndroidPluginConstants.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/util/AndroidPluginConstants.java index 3769324494..8c79cdd9f8 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/util/AndroidPluginConstants.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/util/AndroidPluginConstants.java @@ -37,7 +37,7 @@ public final class AndroidPluginConstants { public static final String VENDOR = "VENDOR"; public static final String OS_VERSION = "OS_VERSION"; public static final String OS_BUILD_DATE = "OS_BUILD_DATE"; - public static final String MAC_ADDRESS = "MAC_ADDRESS"; + public static final String MAC_ADDRESS = "MAC"; //Properties related to AD_FEATURE table public static final String ANDROID_FEATURE_ID = "ID"; From 6cc3f39dd381fdfb238c0468b245ccc31c1accbc Mon Sep 17 00:00:00 2001 From: Harshan Liyanage Date: Thu, 24 Nov 2016 12:36:36 +0530 Subject: [PATCH 02/20] Added security filters to emm-web-agent app --- .../jaggeryapps/emm-web-agent/jaggery.conf | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/jaggery.conf b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/jaggery.conf index 6279943bdd..0c0285ee21 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/jaggery.conf +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/jaggery.conf @@ -98,6 +98,11 @@ { "name": "URLBasedCachePreventionFilter", "class": "org.wso2.carbon.ui.filters.cache.URLBasedCachePreventionFilter" + }, + { + "name":"HttpHeaderSecurityFilter", + "class":"org.apache.catalina.filters.HttpHeaderSecurityFilter", + "params" : [{"name" : "hstsEnabled", "value" : "false"}] } ], "filterMappings": [ @@ -108,6 +113,36 @@ { "name": "URLBasedCachePreventionFilter", "url": "/enrollment/*" + }, + { + "name":"HttpHeaderSecurityFilter", + "url":"*" + } + ], + "listeners" : [ + { + "class" : "org.owasp.csrfguard.CsrfGuardServletContextListener" + }, + { + "class" : "org.owasp.csrfguard.CsrfGuardHttpSessionListener" + } + ], + "servlets" : [ + { + "name" : "JavaScriptServlet", + "class" : "org.owasp.csrfguard.servlet.JavaScriptServlet" + } + ], + "servletMappings" : [ + { + "name" : "JavaScriptServlet", + "url" : "/csrf.js" + } + ], + "contextParams" : [ + { + "name" : "Owasp.CsrfGuard.Config", + "value" : "/repository/conf/security/Owasp.CsrfGuard.dashboard.properties" } ] } From 3b867a533dd423c8e54559a731bd89bb9a0a815c Mon Sep 17 00:00:00 2001 From: inoshperera Date: Thu, 24 Nov 2016 12:46:33 +0530 Subject: [PATCH 03/20] fixing http status code --- .../android/services/impl/DeviceManagementServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java index 2117cccec7..4ca9b9b44d 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java @@ -278,7 +278,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { public Response modifyEnrollment(@PathParam("id") String id, @Valid AndroidDevice androidDevice) { Device device; DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); - deviceIdentifier.setId(androidDevice.getDeviceIdentifier()); + deviceIdentifier.setId(id); deviceIdentifier.setType(AndroidConstants.DEVICE_TYPE_ANDROID); try { device = AndroidAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier); @@ -299,8 +299,8 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { if (device == null) { String errorMessage = "The device to be modified doesn't exist."; log.error(errorMessage); - throw new org.wso2.carbon.mdm.services.android.exception.BadRequestException( - new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); + throw new org.wso2.carbon.mdm.services.android.exception.NotFoundException( + new ErrorResponse.ErrorResponseBuilder().setCode(404l).setMessage(errorMessage).build()); } if(androidDevice.getEnrolmentInfo() != null){ device.setEnrolmentInfo(device.getEnrolmentInfo()); From 18c0760ba5abfd1453e25ac3525feb539ba24468 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Thu, 24 Nov 2016 16:08:48 +0530 Subject: [PATCH 04/20] Changing gcm endpoint to fcm --- .../wso2/carbon/device/mgt/mobile/android/impl/gcm/GCMUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/gcm/GCMUtil.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/gcm/GCMUtil.java index c896714030..381468bdfb 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/gcm/GCMUtil.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/src/main/java/org/wso2/carbon/device/mgt/mobile/android/impl/gcm/GCMUtil.java @@ -51,7 +51,7 @@ public class GCMUtil { private static final Log log = LogFactory.getLog(GCMService.class); - private final static String GCM_ENDPOINT = "https://gcm-http.googleapis.com/gcm/send"; + private final static String GCM_ENDPOINT = "https://fcm.googleapis.com/fcm/send"; private static final String GCM_API_KEY = "gcmAPIKey"; private static final int TIME_TO_LIVE = 60; private static final int HTTP_STATUS_CODE_OK = 200; From 6c9c4a15fda1932ef5743e2b467e66e1c025ff2a Mon Sep 17 00:00:00 2001 From: Megala Date: Fri, 25 Nov 2016 09:44:23 +0530 Subject: [PATCH 05/20] Removing the sender id --- .../configuration.hbs | 12 +----------- .../public/js/platform-configuration.js | 9 ++------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/configuration.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/configuration.hbs index 3e598fb0a5..7e3708ed9d 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/configuration.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/configuration.hbs @@ -34,7 +34,7 @@ @@ -62,16 +62,6 @@ - -
- - -

End User License Agreement ( EULA ) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js index a179701e58..ec2af96395 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js @@ -124,8 +124,6 @@ $(document).ready(function () { $("input#android-config-notifier-frequency").val(config.value / 1000); } else if (config.name == configParams["GCM_API_KEY"]) { $("input#android-config-gcm-api-key").val(config.value); - } else if (config.name == configParams["GCM_SENDER_ID"]) { - $("input#android-config-gcm-sender-id").val(config.value); } else if (config.name == configParams["ANDROID_EULA"]) { $("#android-eula").val(config.value); } @@ -159,7 +157,7 @@ $(document).ready(function () { var notifierType = $("#android-config-notifier").find("option:selected").attr("value"); var notifierFrequency = $("input#android-config-notifier-frequency").val(); var gcmAPIKey = $("input#android-config-gcm-api-key").val(); - var gcmSenderId = $("input#android-config-gcm-sender-id").val(); + var gcmSenderId = "sender_id"; var androidLicense = tinyMCE.activeEditor.getContent(); var errorMsgWrapper = "#android-config-error-msg"; var errorMsg = "#android-config-error-msg span"; @@ -170,10 +168,7 @@ $(document).ready(function () { $(errorMsg).text("Provided notifier frequency is invalid. "); $(errorMsgWrapper).removeClass("hidden"); } else if (notifierType == notifierTypeConstants["GCM"] && !gcmAPIKey) { - $(errorMsg).text("GCM API Key is a required field. It cannot be empty."); - $(errorMsgWrapper).removeClass("hidden"); - } else if (notifierType == notifierTypeConstants["GCM"] && !gcmSenderId) { - $(errorMsg).text("GCM Sender ID is a required field. It cannot be empty."); + $(errorMsg).text("FCM API Key is a required field. It cannot be empty."); $(errorMsgWrapper).removeClass("hidden"); } else { From 7b3be4294e1e6bd596c587118a14c3578e6c1664 Mon Sep 17 00:00:00 2001 From: Megala Date: Fri, 25 Nov 2016 15:49:10 +0530 Subject: [PATCH 06/20] Fixing problems in displaying operation bar for ios --- .../operation-bar.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/operation-bar.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/operation-bar.js index 512edff658..f777ea9af6 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/operation-bar.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/operation-bar.js @@ -63,37 +63,37 @@ function onRequest(context) { // adding ios operations related permission checks permissions["ios"] = []; - if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/lock")) { + if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/ios/lock")) { permissions["ios"].push("DEVICE_LOCK"); } - if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/location")) { + if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/ios/location")) { permissions["ios"].push("LOCATION"); } - if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/enterprise-wipe")) { + if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/ios/enterprise-wipe")) { permissions["ios"].push("ENTERPRISE_WIPE"); } - if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/notification")) { + if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/ios/notification")) { permissions["ios"].push("NOTIFICATION"); } - if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/ring")) { + if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/ios/ring")) { permissions["ios"].push("RING"); } // adding windows operations related permission checks permissions["windows"] = []; - if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/lock")) { + if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/windows/lock")) { permissions["windows"].push("DEVICE_LOCK"); } if (userModule.isAuthorized("/permission/admin/device-mgt/devices/disenroll/windows")) { permissions["windows"].push("DISENROLL"); } - if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/wipe")) { + if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/windows/wipe")) { permissions["windows"].push("WIPE_DATA"); } - if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/ring")) { + if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/windows/ring")) { permissions["windows"].push("DEVICE_RING"); } - if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/windows/lock-reset")) { + if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/operations/windows/lock-reset")) { permissions["windows"].push("LOCK_RESET"); } From 9fb5c3fd93d1ea6b5f7b09f4d142e500227d9ce3 Mon Sep 17 00:00:00 2001 From: dilanua Date: Sat, 26 Nov 2016 08:30:54 +0530 Subject: [PATCH 07/20] Fixes to JIRA: https://wso2.org/jira/browse/EMM-1845 --- .../devicemgt/app/conf/config.json | 3 +- .../mdm.unit.ui.navbar.nav-menu/nav-menu.hbs | 29 +++++++------------ .../mdm.unit.ui.navbar.nav-menu/nav-menu.js | 2 -- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index 4fb7741b97..434db0a382 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -120,6 +120,5 @@ "isOAuthEnabled" : true, "backendRestEndpoints" : { "deviceMgt" : "/api/device-mgt/v1.0" - }, - "deviceStatisticsEnabled" : false + } } \ No newline at end of file diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs index 864ea7e57d..6e3597373c 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs @@ -22,19 +22,6 @@ {{/zone}} {{#zone "navMenu-items"}} -
  • - - - System Resources - -
  • - {{#if dashboardAvailable}} - {{#if permissions.VIEW_DASHBOARD}} -
  • - Device Statistics -
  • - {{/if}} - {{/if}} {{#if permissions.LIST_DEVICES}}
  • @@ -44,7 +31,17 @@
  • {{/if}} - + {{#if permissions.VIEW_DASHBOARD}} +
  • + + Device Statistics + +
  • + {{/if}} + {{#if permissions.LIST_POLICIES}} +
  • + Policy Management
  • + {{/if}} {{#if permissions.USER_MGT_PERMITTED}}
  • User Management
      @@ -59,10 +56,6 @@
  • {{/if}} - {{#if permissions.LIST_POLICIES}} -
  • - Policy Management
  • - {{/if}} {{#if permissions.CONFIG_MGT_PERMITTED}}
  • Configuration Management