Bug 1544533 - Add a policy for local file links. r=Felipe,flod

Differential Revision: https://phabricator.services.mozilla.com/D27566

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Michael Kaply 2019-04-24 07:30:22 +00:00
Родитель ceb466e489
Коммит c56a67c4d0
3 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -679,6 +679,17 @@ var Policies = {
},
},
"LocalFileLinks": {
onBeforeAddons(manager, param) {
// If there are existing capabilities, lock them with the policy pref.
let policyNames = Services.prefs.getCharPref("capability.policy.policynames", "").split(" ");
policyNames.push("localfilelinks_policy");
setAndLockPref("capability.policy.policynames", policyNames.join(" "));
setAndLockPref("capability.policy.localfilelinks_policy.checkloaduri.enabled", "allAccess");
setAndLockPref("capability.policy.localfilelinks_policy.sites", param.join(" "));
},
},
"NetworkPrediction": {
onBeforeAddons(manager, param) {
setAndLockPref("network.dns.disablePrefetch", !param);

Просмотреть файл

@ -403,6 +403,13 @@
}
},
"LocalFileLinks": {
"type": "array",
"items": {
"type": "string"
}
},
"NetworkPrediction": {
"type": "boolean"
},

Просмотреть файл

@ -97,6 +97,8 @@ policy-Homepage = Set and optionally lock the homepage.
policy-InstallAddonsPermission = Allow certain websites to install add-ons.
policy-LocalFileLinks = Allow specific websites to link to local files.
policy-NetworkPrediction = Enable or disable network prediction (DNS prefetching).
policy-NewTabPage = Enable or disable the New Tab page.