Commit e8cca8a4 authored by Felipe Gomes's avatar Felipe Gomes
Browse files

Bug 1429151 - Policy: Disable Sync. r=markh

MozReview-Commit-ID: Eg6hg7GNMod

--HG--
extra : rebase_source : 000a050af56fb0e597a3eaa403c09b15c856b528
parent 00cc8e57
......@@ -140,6 +140,14 @@ var Policies = {
}
},
"DisableFirefoxAccounts": {
onBeforeAddons(manager, param) {
if (param) {
setAndLockPref("identity.fxaccounts.enabled", false);
}
}
},
"DisableFirefoxScreenshots": {
onBeforeAddons(manager, param) {
if (param) {
......@@ -182,7 +190,6 @@ var Policies = {
}
},
"DisplayBookmarksToolbar": {
onBeforeUIStartup(manager, param) {
if (param) {
......
......@@ -115,6 +115,13 @@
"type": "boolean"
},
"DisableFirefoxAccounts": {
"description": "Disables Firefox Account based services, including Sync.",
"first_available": "60.0",
"type": "boolean"
},
"DisableFirefoxScreenshots": {
"description": "Prevents usage of the Firefox Screenshots feature.",
"first_available": "60.0",
......
......@@ -22,6 +22,7 @@ support-files =
[browser_policy_bookmarks.js]
[browser_policy_default_browser_check.js]
[browser_policy_disable_formhistory.js]
[browser_policy_disable_fxaccounts.js]
[browser_policy_disable_fxscreenshots.js]
[browser_policy_disable_masterpassword.js]
[browser_policy_disable_pocket.js]
......
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function test_policy_disable_fxaccounts() {
is(gSync.SYNC_ENABLED, true, "Sync is enabled before setting the policy.");
await setupPolicyEngineWithJson({
"policies": {
"DisableFirefoxAccounts": true
}
});
is(gSync.SYNC_ENABLED, false, "Sync is disabled after setting the policy.");
// Manually clean-up the change made by the policy engine.
// This is needed in case this test runs twice in a row
// (such as in test-verify), in order for the first check
// to pass again.
Services.prefs.unlockPref("identity.fxaccounts.enabled");
Services.prefs.getDefaultBranch("").setBoolPref("identity.fxaccounts.enabled", true);
});
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