Do you really want to remove the selected policy(s)?
- - +Done. Selected policy was successfully removed.
++ Done. Selected policy was successfully removed. +
+ +An unexpected error occurred. Please try again later.
++ An unexpected error occurred. Please try again later +
+ +- You cannot remove policies that have been already applied to devices. - Please deselect active policies from your selection and try again. -
- - -+ Please Try again. +
+ +You cannot remove policies that have been already applied to devices. + Please deselect active policies from your selection and try again.
+Do you really want to publish the selected policy(s)?
- - -+ Do you really want to publish the selected policy(s)? +
+ +Done. Selected policy was successfully published.
- - -+ Done. Selected policy was successfully published. +
+ +An unexpected error occurred. Please try again later.
- - -+ An unexpected error occurred. Please try again later. +
+ +Do you really want to unpublish the selected policy(s)?
- -Done. Selected policy was successfully unpublished.
- - -+ Done. Selected policy was successfully unpublished. +
+ +An unexpected error occurred. Please try again later.
- - -+ An unexpected error occurred. Please try again later. +
+ +Done. New Policy priorities were successfully updated.
- - -+ Done. New Policy priorities were successfully updated. +
+ +An unexpected error occurred. Please try again later.
- - - -+ An unexpected error occurred. Please try again later. +
+ +Do you really want to apply changes to all policies?
- -Done. Changes applied successfully.
- - -+ Done. Changes applied successfully. +
+ +An unexpected error occurred. Please try again later.
- - -+ An unexpected error occurred. Please try again later. +
+ +
-
+
+
+
- Action cannot be performed !
-
-
- Please select a policy or a list of policies to un-publish.
-
-
-
-
+ Action cannot be performed !
+
+
+ + - Action cannot be performed ! -
-- Please select a policy or a list of policies to un-publish. -
- - -Please select a policy or a list of policies to un-publish.
+
-
+
+
+
- Action cannot be performed !
-
-
- You cannot select already inactive policies to be unpublished.
- Please deselect inactive policies and try again.
-
-
-
-
+ Action cannot be performed !
+
+
+ + - Action cannot be performed ! -
-- You cannot select already inactive policies to be unpublished. - Please deselect inactive policies and try again. -
- - -You cannot select already inactive policies to be unpublished. + Please deselect inactive policies and try again.
+
-
+
+
+
- Action cannot be performed !
-
-
- You cannot select already active policies. Please deselect active policies and try again.
-
-
-
-
+ Action cannot be performed !
+
+
+ + - Action cannot be performed ! -
-- You cannot select already active policies. Please deselect active policies and try again. -
- - -You cannot select already active policies. Please deselect active policies and try again.
+
-
+
+
+
- Action cannot be performed !
-
-
- Please select a policy or a list of policies to publish.
-
-
-
-
+ Action cannot be performed !
+
+
+ + - Action cannot be performed ! -
-- Please select a policy or a list of policies to publish. -
- - -Please select a policy or a list of policies to publish.
+
-
+
+
+
- Action cannot be performed !
-
-
- Please select a policy or a list of policies to remove.
-
-
-
-
+ Action cannot be performed !
+
+
+ + - Action cannot be performed ! -
-- Please select a policy or a list of policies to remove. -
- - -Please select a policy or a list of policies to remove.
+Scan QR code to start enrollment
-- Please scan the QR code using your mobile device to retrieve enrollment URL. -
-+ Scan QR code to start enrollment +
+ ++ Please scan the QR code using your mobile device to retrieve enrollment URL. +
+No applications found. " + - "please try refreshing the list in a while.
+ Permission Denied +
++ You are not authorized to view specified device in the system. + {{/if}} {{/zone}} {{#zone "bottomJs"}} + {{#if isAuthorized}} @@ -380,4 +391,5 @@ {{js "js/device-detail.js"}} {{js "js/load-map.js"}} + {{/if}} {{/zone}} \ 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.device.view/view.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.view/view.js index fe0d3a643..05309e1fa 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.view/view.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.view/view.js @@ -17,7 +17,7 @@ */ function onRequest(context) { - var log = new Log("view.js"); + // var log = new Log("view.js"); var deviceType = context.uriParams.deviceType; var deviceId = request.getParameter("id"); var deviceData = {}; @@ -26,6 +26,8 @@ function onRequest(context) { var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var response = deviceModule.viewDevice(deviceType, deviceId); if (response["status"] == "success") { + deviceData["isAuthorized"] = true; + var device = response["content"]; var viewModel = {}; var deviceInfo = device["properties"]["DEVICE_INFO"]; @@ -54,8 +56,7 @@ function onRequest(context) { viewModel["vendor"] = device["properties"]["VENDOR"]; var osBuildDate = device["properties"]["OS_BUILD_DATE"]; if (osBuildDate != null && osBuildDate != "0") { - var formattedDate = new Date(osBuildDate * 1000); - viewModel["os_build_date"] = formattedDate; + viewModel["os_build_date"] = new Date(osBuildDate * 1000); } viewModel["internal_memory"] = {}; viewModel["external_memory"] = {}; @@ -96,6 +97,8 @@ function onRequest(context) { device["viewModel"] = viewModel; } deviceData["device"] = device; + } else if (response["status"] == "unauthorized") { + deviceData["isAuthorized"] = false; } return deviceData; } 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/public/js/nav-menu.js 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/public/js/nav-menu.js index f3c4ea4e3..0fd23a58d 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/public/js/nav-menu.js +++ 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/public/js/nav-menu.js @@ -47,7 +47,6 @@ function setPopupMaxHeight() { */ function showPopup() { $(modalPopup).modal('show'); - //setPopupMaxHeight(); } /* @@ -74,8 +73,8 @@ function generateQRCode(qrCodeClass) { } function toggleEnrollment() { - $(".modal-body").html($("#qr-code-modal").html()); - generateQRCode(".modal-body .qr-code"); + $(".modal-content").html($("#qr-code-modal").html()); + generateQRCode(".modal-content .qr-code"); showPopup(); } diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/app/pages/mdm.page.enrollments.android.download-agent/public/asset/android-agent.apk b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/app/pages/mdm.page.enrollments.android.download-agent/public/asset/android-agent.apk index 8f86ac592..62abf46b6 100644 Binary files a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/app/pages/mdm.page.enrollments.android.download-agent/public/asset/android-agent.apk and b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/app/pages/mdm.page.enrollments.android.download-agent/public/asset/android-agent.apk differ diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementAdminService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementAdminService.java index 6f4ecfd76..4d96f8acd 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementAdminService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementAdminService.java @@ -18,6 +18,7 @@ package org.wso2.carbon.device.mgt.mobile.windows.api.services; +import org.wso2.carbon.apimgt.annotations.api.Permission; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException; import javax.ws.rs.*; @@ -35,26 +36,31 @@ public interface DeviceManagementAdminService { @POST @Path("/lock-devices") + @Permission(name = "Lock Device", permission = "/device-mgt/devices/owning/operations/windows/lock") Response lock(@HeaderParam("Accept") String headerParam, List