From fc3cb449bedf547b074ea6a4bdd9e4279fec7e00 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Wed, 7 Dec 2016 14:35:22 +0530 Subject: [PATCH] adding UI for clear passcode --- .../units/mdm.unit.device.operation-bar/operation-bar.js | 3 +++ .../public/js/operation-mod.js | 6 ++++-- 2 files changed, 7 insertions(+), 2 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 3ab98ab27f..533447a2b0 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 @@ -81,6 +81,9 @@ function onRequest(context) { if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/wipe-data")) { permissions["ios"].push("WIPE_DATA"); } + if (userModule.isAuthorized("/permission/admin/device-mgt/devices/owning/operations/ios/clear-passcode")) { + permissions["ios"].push("CLEAR_PASSCODE"); + } // adding windows operations related permission checks permissions["windows"] = []; 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-mod/public/js/operation-mod.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-mod/public/js/operation-mod.js index 61c9d1ca59..e9306a7d7b 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-mod/public/js/operation-mod.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-mod/public/js/operation-mod.js @@ -120,7 +120,8 @@ var operationModule = function () { "ENTERPRISE_WIPE": "enterprise-wipe", "NOTIFICATION": "notification", "RING": "ring", - "WIPE_DATA": "wipe-data" + "WIPE_DATA": "wipe-data", + "CLEAR_PASSCODE": "clear-passcode" }; return "/api/device-mgt/ios/v1.0/admin/devices/" + featureMap[operationCode]; }; @@ -1288,7 +1289,8 @@ var operationModule = function () { "ENTERPRISE_WIPE": "fw-block", "NOTIFICATION": "fw-message", "RING": "fw-dial-up", - "WIPE_DATA": "fw-delete" + "WIPE_DATA": "fw-delete", + "CLEAR_PASSCODE": "fw-clear" }; return featureMap[operationCode]; };