summaryrefslogtreecommitdiffstats
path: root/browser/components/enterprisepolicies
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/enterprisepolicies')
-rw-r--r--browser/components/enterprisepolicies/Policies.sys.mjs14
-rw-r--r--browser/components/enterprisepolicies/schemas/policies-schema.json8
-rw-r--r--browser/components/enterprisepolicies/tests/xpcshell/test_simple_pref_policies.js13
3 files changed, 33 insertions, 2 deletions
diff --git a/browser/components/enterprisepolicies/Policies.sys.mjs b/browser/components/enterprisepolicies/Policies.sys.mjs
index 21c5bfaa67..8ad1349441 100644
--- a/browser/components/enterprisepolicies/Policies.sys.mjs
+++ b/browser/components/enterprisepolicies/Policies.sys.mjs
@@ -303,6 +303,18 @@ export var Policies = {
},
},
+ AutofillAddressEnabled: {
+ onBeforeAddons(manager, param) {
+ setAndLockPref("extensions.formautofill.addresses.enabled", param);
+ },
+ },
+
+ AutofillCreditCardEnabled: {
+ onBeforeAddons(manager, param) {
+ setAndLockPref("extensions.formautofill.creditCards.enabled", param);
+ },
+ },
+
AutoLaunchProtocolsFromOrigins: {
onBeforeAddons(manager, param) {
for (let info of param) {
@@ -599,8 +611,6 @@ export var Policies = {
"browser.download.dir",
replacePathVariables(param)
);
- // If a custom download directory is being used, just lock folder list to 2.
- setAndLockPref("browser.download.folderList", 2);
},
},
diff --git a/browser/components/enterprisepolicies/schemas/policies-schema.json b/browser/components/enterprisepolicies/schemas/policies-schema.json
index 8ff88935dd..e2161107af 100644
--- a/browser/components/enterprisepolicies/schemas/policies-schema.json
+++ b/browser/components/enterprisepolicies/schemas/policies-schema.json
@@ -86,6 +86,14 @@
}
},
+ "AutofillAddressEnabled": {
+ "type": "boolean"
+ },
+
+ "AutofillCreditCardEnabled": {
+ "type": "boolean"
+ },
+
"AutoLaunchProtocolsFromOrigins": {
"type": ["array", "JSON"],
"items": {
diff --git a/browser/components/enterprisepolicies/tests/xpcshell/test_simple_pref_policies.js b/browser/components/enterprisepolicies/tests/xpcshell/test_simple_pref_policies.js
index 47cd33460c..0a8d77d483 100644
--- a/browser/components/enterprisepolicies/tests/xpcshell/test_simple_pref_policies.js
+++ b/browser/components/enterprisepolicies/tests/xpcshell/test_simple_pref_policies.js
@@ -1021,6 +1021,19 @@ const POLICIES_TESTS = [
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features": true,
},
},
+
+ // POLICY: AutofillAddressEnabled, AutofillCreditCardEnabled
+
+ {
+ policies: {
+ AutofillAddressEnabled: false,
+ AutofillCreditCardEnabled: false,
+ },
+ lockedPrefs: {
+ "extensions.formautofill.addresses.enabled": false,
+ "extensions.formautofill.creditCards.enabled": false,
+ },
+ },
];
add_task(async function test_policy_simple_prefs() {