From 0f1b17a25e5439ba135e51e9423622c8525a4c67 Mon Sep 17 00:00:00 2001 From: lakshani Date: Tue, 4 Apr 2017 18:00:24 +0530 Subject: [PATCH] Fixed the issue in application restriction for iOS --- .../public/js/operation-mod.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/public/js/operation-mod.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/public/js/operation-mod.js index 0ea06a2ab05..9cde4429486 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/public/js/operation-mod.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/public/js/operation-mod.js @@ -109,6 +109,7 @@ var operationModule = function () { "APN_OPERATION_CODE": "APN", "CELLULAR_OPERATION_CODE": "CELLULAR", "PER_APP_VPN_OPERATION_CODE": "PER_APP_VPN", + "APPLICATION_OPERATION_CODE": "APP-RESTRICTION", "APP_TO_PER_APP_VPN_MAPPING_OPERATION_CODE": "APP_TO_PER_APP_VPN_MAPPING" }; @@ -288,6 +289,12 @@ var operationModule = function () { } }; break; + case iosOperationConstants["APPLICATION_OPERATION_CODE"]: + payload = { + "restrictionType": operationPayload["restriction-type"], + "restrictedApplications": operationPayload["restricted-applications"] + }; + break; case iosOperationConstants["WIFI_OPERATION_CODE"]: payload = { "wifiHiddenNetwork": operationPayload["hiddenNetwork"], @@ -579,6 +586,14 @@ var operationModule = function () { } }; break; + case iosOperationConstants["APPLICATION_OPERATION_CODE"]: + payload = { + "operation": { + "restriction-type": operationData["restrictionType"], + "restricted-applications": operationData["restrictedApplications"] + } + }; + break; case iosOperationConstants["RESTRICTIONS_OPERATION_CODE"]: operationType = operationTypeConstants["PROFILE"]; payload = {