mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Bug 1484843 - Add policy for disabling DNS over HTTPS r=flod,Felipe,jkt
Differential Revision: https://phabricator.services.mozilla.com/D7743 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
24dfa1120c
commit
c0604754c9
@ -198,6 +198,26 @@ var Policies = {
|
||||
},
|
||||
},
|
||||
|
||||
"DNSOverHTTPS": {
|
||||
onBeforeAddons(manager, param) {
|
||||
if ("Enabled" in param) {
|
||||
let mode = param.Enabled ? 2 : 5;
|
||||
if (param.Locked) {
|
||||
setAndLockPref("network.trr.mode", mode);
|
||||
} else {
|
||||
setDefaultPref("network.trr.mode", mode);
|
||||
}
|
||||
}
|
||||
if (param.ProviderURL) {
|
||||
if (param.Locked) {
|
||||
setAndLockPref("network.trr.uri", param.ProviderURL.href);
|
||||
} else {
|
||||
setDefaultPref("network.trr.uri", param.ProviderURL.href);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
"DisableAppUpdate": {
|
||||
onBeforeAddons(manager, param) {
|
||||
if (param) {
|
||||
|
@ -141,6 +141,21 @@
|
||||
}
|
||||
},
|
||||
|
||||
"DNSOverHTTPS": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"ProviderURL": {
|
||||
"type": "URLorEmpty"
|
||||
},
|
||||
"Locked": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"DisableAppUpdate": {
|
||||
"machine_only": true,
|
||||
|
||||
|
@ -154,6 +154,35 @@ const POLICIES_TESTS = [
|
||||
"privacy.clearOnShutdown.offlineApps": true,
|
||||
},
|
||||
},
|
||||
|
||||
// POLICY: DNSOverHTTPS Locked
|
||||
{
|
||||
policies: {
|
||||
"DNSOverHTTPS": {
|
||||
"Enabled": true,
|
||||
"ProviderURL": "http://example.com/provider",
|
||||
"Locked": true,
|
||||
},
|
||||
},
|
||||
lockedPrefs: {
|
||||
"network.trr.mode": 2,
|
||||
"network.trr.uri": "http://example.com/provider",
|
||||
},
|
||||
},
|
||||
|
||||
// POLICY: DNSOverHTTPS Unlocked
|
||||
{
|
||||
policies: {
|
||||
"DNSOverHTTPS": {
|
||||
"Enabled": false,
|
||||
"ProviderURL": "http://example.com/provider",
|
||||
},
|
||||
},
|
||||
unlockedPrefs: {
|
||||
"network.trr.mode": 5,
|
||||
"network.trr.uri": "http://example.com/provider",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
add_task(async function test_policy_remember_passwords() {
|
||||
|
@ -70,6 +70,8 @@ policy-DisplayBookmarksToolbar = Display the Bookmarks Toolbar by default.
|
||||
|
||||
policy-DisplayMenuBar = Display the Menu Bar by default.
|
||||
|
||||
policy-DNSOverHTTPS = Configure DNS over HTTPS.
|
||||
|
||||
policy-DontCheckDefaultBrowser = Disable check for default browser on startup.
|
||||
|
||||
# “lock” means that the user won’t be able to change this setting
|
||||
|
Loading…
Reference in New Issue
Block a user