summaryrefslogtreecommitdiffstats
path: root/browser/components/enterprisepolicies
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 18:34:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 18:34:58 +0000
commit1d5bb90cb0a1b457570019845fed207faed67a99 (patch)
treed95f8ea0fb9c9c4eb9ae55c70faa2bc02a7bcea4 /browser/components/enterprisepolicies
parentAdding upstream version 115.9.1esr. (diff)
downloadfirefox-esr-647942fa887222a841bec4bfb10ffec54eb7ef2f.tar.xz
firefox-esr-647942fa887222a841bec4bfb10ffec54eb7ef2f.zip
Adding upstream version 115.10.0esr.upstream/115.10.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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() {