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.operation-mod/public/js/operation-mod.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.operation-mod/public/js/operation-mod.js index 658312ff31..3ead46e634 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.operation-mod/public/js/operation-mod.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.operation-mod/public/js/operation-mod.js @@ -75,7 +75,11 @@ var androidOperationModule = function () { "SET_STATUS_BAR_DISABLED": "SET_STATUS_BAR_DISABLED", "APPLICATION_OPERATION_CODE": "APP-RESTRICTION", "SYSTEM_UPDATE_POLICY_CODE": "SYSTEM_UPDATE_POLICY", - "KIOSK_APPS_CODE": "KIOSK_APPS" + "KIOSK_APPS_CODE": "KIOSK_APPS", + "RUNTIME_PERMISSION_POLICY_OPERATION": "runtime-permission-policy", + "RUNTIME_PERMISSION_POLICY_OPERATION_CODE": "RUNTIME_PERMISSION_POLICY", + "COSU_PROFILE_CONFIGURATION_OPERATION": "cosu-profile-configuration", + "COSU_PROFILE_CONFIGURATION_OPERATION_CODE": "COSU_PROFILE" }; /** @@ -157,6 +161,17 @@ var androidOperationModule = function () { }; } break; + case androidOperationConstants["RUNTIME_PERMISSION_POLICY_OPERATION_CODE"]: + payload = { + "defaultType": operationPayload["defaultPermissionType"], + "permittedApplications": operationPayload["permittedApplications"] + }; + break; + case androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"]: + payload = { + "cosuProfileRestrictionStartTime": operationPayload["cosuProfileOperationRestrictionEndTime"], + "cosuProfileRestrictionEndTime": operationPayload["cosuProfileOperationRestrictionEndTime"] + } case androidOperationConstants["KIOSK_APPS_CODE"]: payload = { "cosuWhitelistedApplications": operationPayload["whitelistedApplications"] @@ -325,6 +340,24 @@ var androidOperationModule = function () { } }; break; + case androidOperationConstants["RUNTIME_PERMISSION_POLICY_OPERATION_CODE"]: + operationType = operationTypeConstants["PROFILE"]; + payload = { + "operation": { + "defaultType": operationData["defaultPermissionType"], + "permittedApplications": operationData["permittedApplications"] + } + }; + break; + case androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"]: + operationType = operationTypeConstants["PROFILE"]; + payload = { + "operation": { + "cosuProfileRestrictionStartTime": operationData["cosuProfileOperationRestrictionStartTime"], + "cosuProfileRestrictionEndTime": operationData["cosuProfileOperationRestrictionEndTime"] + } + }; + break; case androidOperationConstants["SYSTEM_UPDATE_POLICY_CODE"]: operationType = operationTypeConstants["PROFILE"]; if (operationData["cosuSystemUpdatePolicyType"] != "window") { 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.policy-edit/public/js/android-policy-edit.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.policy-edit/public/js/android-policy-edit.js index 78b6e8054e..c18f204d7c 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.policy-edit/public/js/android-policy-edit.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.policy-edit/public/js/android-policy-edit.js @@ -33,7 +33,11 @@ var androidOperationConstants = { "APPLICATION_OPERATION": "app-restriction", "APPLICATION_OPERATION_CODE": "APP-RESTRICTION", "KIOSK_APPS_CODE": "KIOSK_APPS", - "KIOSK_APPS": "cosu-whitelisted-applications" + "KIOSK_APPS": "cosu-whitelisted-applications", + "RUNTIME_PERMISSION_POLICY_OPERATION_CODE": "RUNTIME_PERMISSION_POLICY", + "RUNTIME_PERMISSION_POLICY_OPERATION": "runtime-permission-policy", + "COSU_PROFILE_CONFIGURATION_OPERATION": "cosu-profile-configuration", + "COSU_PROFILE_CONFIGURATION_OPERATION_CODE": "COSU_PROFILE" }; /** @@ -221,6 +225,15 @@ var validatePolicyProfile = function () { // updating validationStatusArray with validationStatus validationStatusArray.push(validationStatus); } + // Validating COSU PROFILE CONFIGURATION + if ($.inArray(androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"], configuredOperations) != -1) { + operation = androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION"]; + validationStatus = { + "error": false, + "okFeature": operation + }; + validationStatusArray.push(validationStatus); + } // Validating ENCRYPT_STORAGE if ($.inArray(androidOperationConstants["ENCRYPT_STORAGE_OPERATION_CODE"], configuredOperations) != -1) { // if ENCRYPT_STORAGE is configured @@ -233,6 +246,18 @@ var validatePolicyProfile = function () { // updating validationStatusArray with validationStatus validationStatusArray.push(validationStatus); } + // Validating RUNTIME_PERMISSION + if ($.inArray(androidOperationConstants["RUNTIME_PERMISSION_POLICY_OPERATION_CODE"], configuredOperations) != -1) { + // if policy is configured + operation = androidOperationConstants["RUNTIME_PERMISSION_POLICY_OPERATION"]; + // updating validationStatus + validationStatus = { + "error": false, + "okFeature": operation + }; + // updating validationStatusArray with validationStatus + validationStatusArray.push(validationStatus); + } // Validating WIFI if ($.inArray(androidOperationConstants["WIFI_OPERATION_CODE"], configuredOperations) != -1) { // if WIFI is configured 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.policy-edit/public/templates/android-policy-edit.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.policy-edit/public/templates/android-policy-edit.hbs index 62ab1f6f6c..5736e69a0d 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.policy-edit/public/templates/android-policy-edit.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.policy-edit/public/templates/android-policy-edit.hbs @@ -75,6 +75,17 @@ + + + + + COSU Profile Configurations + + + + @@ -86,6 +97,18 @@ + + + + + + Runtime Permission Policy (COSU) + + + + @@ -1206,6 +1229,318 @@ + + +
+
+ +
+
+
+ + + +
+ +
+
+ + + + + Add Application + +
+ + + + + + + + + + + + + + + + +
No:ApplicationPackage NamePermission NamePermission Type
+ No entries added yet . +
+ + + + + + + + + + + + +
+
+
+
+
+
    + + Already granted or denied permissions are not affected by this policy. +
    + + Permissions can be granted or revoked only for applications built with a Target SDK Version of Android Marshmallow or later. +
+
+
+
+
+ + +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+ + +
+
+ + +
+ +
+
+
+
+
+ +
+ + + + + COSU Profile Configurations + + + + @@ -69,6 +79,18 @@ + + + + + + Runtime Permission Policy (COSU) + + + + @@ -922,6 +944,181 @@
+ + +
+
+ + +
+
+ +
+ + +
+
+ +
+
+ + +
+ + +
+ +
+
+ + + + + + + + + + + + + + + + +
No:ApplicationPackage NamePermission NamePermission Type
+ No entries added yet . +
+ + + + + + + + + + + + +
+
+
+
+
+
    + + Already granted or denied permissions are not affected by this policy. +
    + + Permissions can be granted or revoked only for applications built with a Target SDK Version of Android Marshmallow or later. +
+
+
+
+
+ +
+ + + + + COSU Profile Configurations + + + + @@ -88,6 +99,18 @@ class="fw fw-success"> + + + + + + Runtime Permission Policy + + + + @@ -270,8 +293,6 @@
- -
@@ -1041,6 +1062,178 @@
+ +
+ +
+ +
@@ -1127,8 +1320,7 @@
- Configure the settings to access mobile applications via the Android Work Profile. -
+ Configure these settings to manage the applications in the work profile.
@@ -1161,12 +1353,12 @@
@@ -1188,12 +1380,11 @@
@@ -1202,12 +1393,12 @@ @@ -1215,6 +1406,145 @@
+ + +
+
+ +
+
+
+ + + +
+ +
+
+ + + + + Add Application + +
+ + + + + + + + + + + + + + + + +
No:ApplicationPackage NamePermission NamePermission Type
+ No entries added yet . +
+ + + + + + + + + + + + +
+
+
+
+
+
    + + Already granted or denied permissions are not affected by this policy. +
    + + Permissions can be granted or revoked only for applications built with a Target SDK Version of Android Marshmallow or later. +
+
+
+
+
+