|
|
|
@ -114,7 +114,9 @@ var androidOperationConstants = {
|
|
|
|
|
"WIFI_OPERATION": "wifi",
|
|
|
|
|
"WIFI_OPERATION_CODE": "WIFI",
|
|
|
|
|
"APPLICATION_OPERATION":"app-restriction",
|
|
|
|
|
"APPLICATION_OPERATION_CODE":"APP-RESTRICTION"
|
|
|
|
|
"APPLICATION_OPERATION_CODE":"APP-RESTRICTION",
|
|
|
|
|
"KIOSK_APPS_CODE":"KIOSK_APPS",
|
|
|
|
|
"KIOSK_APPS":"cosu-whitelisted-applications"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Constants to define Android Operation Constants
|
|
|
|
@ -491,6 +493,93 @@ validateStep["policy-profile"] = function () {
|
|
|
|
|
validationStatusArray.push(validationStatus);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if ($.inArray(androidOperationConstants["KIOSK_APPS_CODE"], configuredOperations) != -1) {
|
|
|
|
|
//If COSU whitelisting applications configured
|
|
|
|
|
operation = androidOperationConstants["KIOSK_APPS"];
|
|
|
|
|
// Initializing continueToCheckNextInputs to true
|
|
|
|
|
continueToCheckNextInputs = true;
|
|
|
|
|
|
|
|
|
|
var whitelistedApplicationsGridChildInputs = "div#cosu-whitelisted-applications .child-input";
|
|
|
|
|
|
|
|
|
|
if (continueToCheckNextInputs) {
|
|
|
|
|
if ($(whitelistedApplicationsGridChildInputs).length == 0) {
|
|
|
|
|
validationStatus = {
|
|
|
|
|
"error": true,
|
|
|
|
|
"subErrorMsg": "Applications are not provided in application whitelist list.",
|
|
|
|
|
"erroneousFeature": operation
|
|
|
|
|
};
|
|
|
|
|
continueToCheckNextInputs = false;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
childInputCount = 0;
|
|
|
|
|
childInputArray = [];
|
|
|
|
|
emptyChildInputCount = 0;
|
|
|
|
|
duplicatesExist = false;
|
|
|
|
|
// Looping through each child input
|
|
|
|
|
$(whitelistedApplicationsGridChildInputs).each(function () {
|
|
|
|
|
childInputCount++;
|
|
|
|
|
if (childInputCount % 2 == 0) {
|
|
|
|
|
// If child input is of second column
|
|
|
|
|
childInput = $(this).val();
|
|
|
|
|
childInputArray.push(childInput);
|
|
|
|
|
// Updating emptyChildInputCount
|
|
|
|
|
if (!childInput) {
|
|
|
|
|
// If child input field is empty
|
|
|
|
|
emptyChildInputCount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// Checking for duplicates
|
|
|
|
|
initialChildInputArrayLength = childInputArray.length;
|
|
|
|
|
if (emptyChildInputCount == 0 && initialChildInputArrayLength > 1) {
|
|
|
|
|
for (m = 0; m < (initialChildInputArrayLength - 1); m++) {
|
|
|
|
|
poppedChildInput = childInputArray.pop();
|
|
|
|
|
for (n = 0; n < childInputArray.length; n++) {
|
|
|
|
|
if (poppedChildInput == childInputArray[n]) {
|
|
|
|
|
duplicatesExist = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (duplicatesExist) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// Updating validationStatus
|
|
|
|
|
if (emptyChildInputCount > 0) {
|
|
|
|
|
// If empty child inputs are present
|
|
|
|
|
validationStatus = {
|
|
|
|
|
"error": true,
|
|
|
|
|
"subErrorMsg": "One or more package names of " +
|
|
|
|
|
"applications are empty.",
|
|
|
|
|
"erroneousFeature": operation
|
|
|
|
|
};
|
|
|
|
|
continueToCheckNextInputs = false;
|
|
|
|
|
} else if (duplicatesExist) {
|
|
|
|
|
// If duplicate input is present
|
|
|
|
|
validationStatus = {
|
|
|
|
|
"error": true,
|
|
|
|
|
"subErrorMsg": "Duplicate values exist with " +
|
|
|
|
|
"for package names.",
|
|
|
|
|
"erroneousFeature": operation
|
|
|
|
|
};
|
|
|
|
|
continueToCheckNextInputs = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (continueToCheckNextInputs) {
|
|
|
|
|
validationStatus = {
|
|
|
|
|
"error": false,
|
|
|
|
|
"okFeature": operation
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Updating validationStatusArray with validationStatus
|
|
|
|
|
validationStatusArray.push(validationStatus);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} if (policy["platform"] == platformTypeConstants["WINDOWS"]) {
|
|
|
|
|