From 1ad144469f2fcc39139dbd313e9d2c9ad363665e Mon Sep 17 00:00:00 2001 From: inoshperera Date: Thu, 30 Jan 2020 21:38:53 +0530 Subject: [PATCH] configure display lock timeout --- .../public/js/operation-mod.js | 45 +++++++++---------- .../public/templates/android-policy-edit.hbs | 25 +++++++++++ .../public/templates/android-policy-view.hbs | 25 +++++++++++ .../templates/android-policy-operations.hbs | 24 ++++++++++ 4 files changed, 96 insertions(+), 23 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.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 9db096b413..7bc120a3cb 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 @@ -132,19 +132,19 @@ var androidOperationModule = function () { "passcodePolicyMinComplexChars": operationPayload["minComplexChars"], "passcodePolicyMaxPasscodeAgeInDays": operationPayload["maxPINAgeInDays"], "passcodePolicyPasscodeHistory": operationPayload["pinHistory"], - "passcodePolicyMaxFailedAttempts": operationPayload["maxFailedAttempts"] + "passcodePolicyMaxFailedAttempts": operationPayload["maxFailedAttempts"], + "passcodePolicyMaxTimeToLock": operationPayload["maxTimeToLock"], + "passcodePolicyWPExist": operationPayload["passcodePolicyWPExist"] }; if (operationPayload["passcodePolicyWPExist"] === true) { - payload["passcodePolicyWPExist"] = operationPayload["passcodePolicyWPExist"]; - payload["passcodePolicyAllowSimpleWP"] = operationPayload.workProfilePasscode["passcodePolicyAllowSimpleWP"]; - payload["passcodePolicyRequireAlphanumericWP"] = operationPayload.workProfilePasscode["passcodePolicyRequireAlphanumericWP"]; - payload["passcodePolicyMinLengthWP"] = operationPayload.workProfilePasscode["passcodePolicyMinLengthWP"]; - payload["passcodePolicyMinComplexCharsWP"] = operationPayload.workProfilePasscode["passcodePolicyMinComplexCharsWP"]; - payload["passcodePolicyMaxPasscodeAgeInDaysWP"] = operationPayload.workProfilePasscode["passcodePolicyMaxPasscodeAgeInDaysWP"]; - payload["passcodePolicyPasscodeHistoryWP"] = operationPayload.workProfilePasscode["passcodePolicyPasscodeHistoryWP"]; - payload["passcodePolicyMaxFailedAttemptsWP"] = operationPayload.workProfilePasscode["passcodePolicyMaxFailedAttemptsWP"]; - } else { - payload["passcodePolicyWPExist"] = operationPayload["passcodePolicyWPExist"]; + payload["passcodePolicyAllowSimpleWP"] = operationPayload.workProfilePasscode["allowSimpleWP"]; + payload["passcodePolicyRequireAlphanumericWP"] = operationPayload.workProfilePasscode["requireAlphanumericWP"]; + payload["passcodePolicyMinLengthWP"] = operationPayload.workProfilePasscode["minLengthWP"]; + payload["passcodePolicyMinComplexCharsWP"] = operationPayload.workProfilePasscode["minComplexCharsWP"]; + payload["passcodePolicyMaxPasscodeAgeInDaysWP"] = operationPayload.workProfilePasscode["maxPINAgeInDaysWP"]; + payload["passcodePolicyPasscodeHistoryWP"] = operationPayload.workProfilePasscode["pinHistoryWP"]; + payload["passcodePolicyMaxFailedAttemptsWP"] = operationPayload.workProfilePasscode["maxFailedAttemptsWP"]; + payload["passcodePolicyMaxTimeToLockWP"] = operationPayload.workProfilePasscode["maxTimeToLockWP"]; } break; case androidOperationConstants["CAMERA_OPERATION_CODE"]: @@ -515,25 +515,24 @@ var androidOperationModule = function () { "minComplexChars": operationData["passcodePolicyMinComplexChars"], "maxPINAgeInDays": operationData["passcodePolicyMaxPasscodeAgeInDays"], "pinHistory": operationData["passcodePolicyPasscodeHistory"], - "maxFailedAttempts": operationData["passcodePolicyMaxFailedAttempts"] + "maxFailedAttempts": operationData["passcodePolicyMaxFailedAttempts"], + "maxTimeToLock": operationData["passcodePolicyMaxTimeToLock"], + "passcodePolicyWPExist": operationData["passcodePolicyWPExist"] } }; workProfilePasscode = {}; if (operationData["passcodePolicyWPExist"] === true) { - payload.operation["passcodePolicyWPExist"] = operationData["passcodePolicyWPExist"]; - workProfilePasscode["passcodePolicyAllowSimpleWP"] = operationData["passcodePolicyAllowSimpleWP"]; - workProfilePasscode["passcodePolicyRequireAlphanumericWP"] = operationData["passcodePolicyRequireAlphanumericWP"]; - workProfilePasscode["passcodePolicyMinLengthWP"] = operationData["passcodePolicyMinLengthWP"]; - workProfilePasscode["passcodePolicyMinComplexCharsWP"] = operationData["passcodePolicyMinComplexCharsWP"]; - workProfilePasscode["passcodePolicyMaxPasscodeAgeInDaysWP"] = operationData["passcodePolicyMaxPasscodeAgeInDaysWP"]; - workProfilePasscode["passcodePolicyPasscodeHistoryWP"] = operationData["passcodePolicyPasscodeHistoryWP"]; - workProfilePasscode["passcodePolicyMaxFailedAttemptsWP"] = operationData["passcodePolicyMaxFailedAttemptsWP"] ; + workProfilePasscode["allowSimpleWP"] = operationData["passcodePolicyAllowSimpleWP"]; + workProfilePasscode["requireAlphanumericWP"] = operationData["passcodePolicyRequireAlphanumericWP"]; + workProfilePasscode["minLengthWP"] = operationData["passcodePolicyMinLengthWP"]; + workProfilePasscode["minComplexCharsWP"] = operationData["passcodePolicyMinComplexCharsWP"]; + workProfilePasscode["maxPINAgeInDaysWP"] = operationData["passcodePolicyMaxPasscodeAgeInDaysWP"]; + workProfilePasscode["pinHistoryWP"] = operationData["passcodePolicyPasscodeHistoryWP"]; + workProfilePasscode["maxFailedAttemptsWP"] = operationData["passcodePolicyMaxFailedAttemptsWP"] ; + workProfilePasscode["maxTimeToLockWP"] = operationData["passcodePolicyMaxTimeToLockWP"]; payload.operation.workProfilePasscode = workProfilePasscode; - } else { - payload["passcodePolicyWPExist"] = operationData["passcodePolicyWPExist"]; } break; - break; case androidOperationConstants["APPLICATION_OPERATION_CODE"]: payload = { "operation": { 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 bd568a7279..46a93b34e6 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 @@ -328,6 +328,18 @@ +
+ + +
+

Passcode policy for work profile

@@ -466,6 +478,19 @@
+
+ + +
+ 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-view/public/templates/android-policy-view.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-view/public/templates/android-policy-view.hbs index 71cd6df7af..f5e58aa0e2 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-view/public/templates/android-policy-view.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-view/public/templates/android-policy-view.hbs @@ -310,6 +310,18 @@ +
+ + +
+

Passcode policy for work profile

@@ -447,6 +459,19 @@
+ +
+ + +
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-wizard/public/templates/android-policy-operations.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-wizard/public/templates/android-policy-operations.hbs index 033a825804..605d6f5344 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-wizard/public/templates/android-policy-operations.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-wizard/public/templates/android-policy-operations.hbs @@ -336,6 +336,18 @@ +
+ + +
+

Passcode policy for work profile

@@ -474,6 +486,18 @@
+
+ + +