Commit 2188321e authored by Michael Kaply's avatar Michael Kaply
Browse files

Bug 1491046 - Allow a whitelist of preferences via policy. r=Felipe,flod

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

--HG--
extra : moz-landing-system : lando
parent dee2fdd7
......@@ -751,6 +751,14 @@ var Policies = {
},
},
"Preferences": {
onBeforeAddons(manager, param) {
for (let preference in param) {
setAndLockPref(preference, param[preference]);
}
},
},
"Proxy": {
onBeforeAddons(manager, param) {
if (param.Locked) {
......
......@@ -551,6 +551,21 @@
}
},
"Preferences": {
"type": "object",
"properties": {
"network.IDN_show_punycode": {
"type": "boolean"
},
"browser.fixup.dns_first_for_single_words": {
"type": "boolean"
},
"browser.cache.disk.parent_directory": {
"type": "string"
}
}
},
"Proxy": {
"type": "object",
"properties": {
......
......@@ -58,6 +58,7 @@ skip-if = (verify && debug && (os == 'mac'))
[browser_policy_override_postupdatepage.js]
[browser_policy_permissions.js]
[browser_policy_proxy.js]
[browser_policy_preferences.js]
[browser_policy_search_engine.js]
[browser_policy_searchbar.js]
[browser_policy_set_homepage.js]
......
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* This test is not intended to test all preferences that
can be set with Preferences, just a subset to verify
the overall functionality */
"use strict";
add_task(async function test_policy_preferences() {
await setupPolicyEngineWithJson({
"policies": {
"Preferences": {
"network.IDN_show_punycode": true,
"app.update.log": true,
},
},
});
checkLockedPref("network.IDN_show_punycode", true);
is(Services.prefs.getBoolPref("app.update.log"), false, "Disallowed pref was not been changed");
});
......@@ -111,6 +111,8 @@ policy-Permissions = Configure permissions for camera, microphone, location and
policy-PopupBlocking = Allow certain websites to display popups by default.
policy-Preferences = Set and lock the value for a subset of preferences.
policy-Proxy = Configure proxy settings.
policy-RequestedLocales = Set the list of requested locales for the application in order of preference.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment