Merge branch 'enrollment-app-install-webclip' into 'master'

Allow web clips installation via enrollment app install policy

Closes product-iots#61

See merge request entgra/carbon-device-mgt!46
revert-70aa11f8
Dharmakeerthi Lasantha 6 years ago
commit c1d6462e7d

@ -223,7 +223,13 @@ policyModule = function () {
appObjectToView = {};
appObjectToView["appName"] = appObjectFromRestEndpoint["name"];
appObjectToView["appId"] = appObjectFromRestEndpoint["id"];
appObjectToView["packageName"] = appObjectFromRestEndpoint["appmeta"]["package"];
if ("webapp" === appObjectFromRestEndpoint["platform"]) {
appObjectToView["packageName"] = appObjectFromRestEndpoint["appmeta"]["weburl"];
appObjectToView["type"] = "Web Clip"
} else {
appObjectToView["packageName"] = appObjectFromRestEndpoint["appmeta"]["package"];
appObjectToView["type"] = "Mobile App"
}
appObjectToView["version"] = appObjectFromRestEndpoint["version"];
appObjectToView["platform"] = appObjectFromRestEndpoint["platform"];
storeApps.push(appObjectToView);

@ -202,7 +202,7 @@ function getStoreApps(storeApps, deviceType) {
var selectedApps = [];
var i;
for (i=0; i<storeApps.length; i++) {
if (deviceType === storeApps[i].platform) {
if (deviceType === storeApps[i].platform || "webapp" === storeApps[i].platform) {
selectedApps.push(storeApps[i]);
}
}

@ -259,7 +259,7 @@ function getStoreApps(storeApps, deviceType) {
var selectedApps = [];
var i;
for (i=0; i<storeApps.length; i++) {
if (storeApps[i].platform === deviceType) {
if (storeApps[i].platform === deviceType || "webapp" === storeApps[i].platform) {
selectedApps.push(storeApps[i]);
}
}

Loading…
Cancel
Save