Commit 456bf3f9 authored by Felipe Gomes's avatar Felipe Gomes
Browse files

Bug 1429148 - Policy: Enforce choice for the Remember Passwords setting. r=MattN

MozReview-Commit-ID: 3acY4QwQWGb

--HG--
extra : rebase_source : 0c548848eaa0b90be5deec112122b840e8c2d21d
parent 6a6a6986
......@@ -153,6 +153,12 @@ this.Policies = {
}
},
"RememberPasswords": {
onBeforeUIStartup(manager, param) {
setAndLockPref("signon.rememberSignons", param);
}
},
"install_addons": {
onBeforeUIStartup(manager, param) {
addAllowDenyPermissions("install", param.allow, param.block);
......
......@@ -143,6 +143,13 @@
}
},
"RememberPasswords": {
"description": "Enforces the setting to allow Firefox to remember saved logins and passwords. Both true and false values are accepted.",
"first_available": "60.0",
"type": "boolean"
},
"install_addons": {
"description": "Allow or deny popup websites to install webextensions.",
"first_available": "60.0",
......
......@@ -23,4 +23,5 @@ support-files =
[browser_policy_disable_formhistory.js]
[browser_policy_display_menu.js]
[browser_policy_disable_shield.js]
[browser_policy_remember_passwords.js]
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function test_policy_remember_passwords() {
await setupPolicyEngineWithJson({
"policies": {
"RememberPasswords": false
}
});
is(Services.prefs.getBoolPref("signon.rememberSignons"), false, "Logins & Passwords have been disabled");
is(Services.prefs.prefIsLocked("signon.rememberSignons"), true, "Logins & Passwords pref has been locked");
await setupPolicyEngineWithJson({
"policies": {
"RememberPasswords": true
}
});
is(Services.prefs.getBoolPref("signon.rememberSignons"), true, "Logins & Passwords have been enabled");
is(Services.prefs.prefIsLocked("signon.rememberSignons"), true, "Logins & Passwords pref has been locked");
});
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