Commit 3ebcded6 authored by Michael Kaply's avatar Michael Kaply
Browse files

Bug 1577149 - Additional preferences managed by policy requested by users. r=mconley, a=RyanVM

--HG--
extra : rebase_source : 1b946357c01150f90a4c49ddc86e8d8d84fa1c65
extra : source : 5d88242a100d287b7559b420ea0fe5952c7be425
parent c6da843d
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -104,19 +104,33 @@ var Policies = {
        );
      }
      if ("AllowNonFQDN" in param) {
        if (param.AllowNonFQDN.NTLM) {
        if ("NTLM" in param.AllowNonFQDN) {
          setAndLockPref(
            "network.automatic-ntlm-auth.allow-non-fqdn",
            param.AllowNonFQDN.NTLM
          );
        }
        if (param.AllowNonFQDN.SPNEGO) {
        if ("SPNEGO" in param.AllowNonFQDN) {
          setAndLockPref(
            "network.negotiate-auth.allow-non-fqdn",
            param.AllowNonFQDN.SPNEGO
          );
        }
      }
      if ("AllowProxies" in param) {
        if ("NTLM" in param.AllowProxies) {
          setAndLockPref(
            "network.automatic-ntlm-auth.allow-proxies",
            param.AllowProxies.NTLM
          );
        }
        if ("SPNEGO" in param.AllowProxies) {
          setAndLockPref(
            "network.negotiate-auth.allow-proxies",
            param.AllowProxies.SPNEGO
          );
        }
      }
    },
  },

+74 −1
Original line number Diff line number Diff line
@@ -53,6 +53,18 @@
              "type": "boolean"
            }
          }
        },
        "AllowProxies": {
          "type": "object",
          "properties": {
            "SPNEGO": {
              "type": "boolean"
            },

            "NTLM": {
              "type": "boolean"
            }
          }
        }
      }
    },
@@ -270,6 +282,18 @@
        "ProviderURL": {
          "type": "URLorEmpty"
        },
        "AllowProxies": {
          "type": "object",
          "properties": {
            "SPNEGO": {
              "type": "boolean"
            },

            "NTLM": {
              "type": "boolean"
            }
          }
        },
        "Locked": {
          "type": "boolean"
        }
@@ -662,15 +686,37 @@
    "Preferences": {
      "type": "object",
      "properties": {
        "accessibility.force_disabled": {
          "type": "number",
          "enum": [-1, 0, 1]
        },
        "app.update.auto": {
          "type": "boolean"
        },
        "browser.bookmarks.autoExportHTML": {
          "type": "boolean"
        },
        "browser.bookmarks.file": {
          "type": "string"
        },
        "browser.places.importBookmarksHTML": {
          "type": "boolean"
        },
        "browser.bookmarks.restore_default_bookmarks": {
          "type": "boolean"
        },
        "browser.cache.disk.enable": {
          "type": "boolean"
        },
        "browser.fixup.dns_first_for_single_words": {
          "type": "boolean"
        },
        "browser.safebrowsing.phishing.enabled": {
          "type": "boolean"
        },
        "browser.safebrowsing.malware.enabled": {
          "type": "boolean"
        },
        "browser.search.update": {
          "type": "boolean"
        },
@@ -680,6 +726,15 @@
        "browser.cache.disk.parent_directory": {
          "type": "string"
        },
        "browser.slowStartup.notificationDisabled": {
          "type": "boolean"
        },
        "browser.taskbar.previews.enable": {
          "type": "boolean"
        },
        "browser.urlbar.suggest.bookmark": {
          "type": "boolean"
        },
        "browser.urlbar.suggest.openpage": {
          "type": "boolean"
        },
@@ -689,7 +744,7 @@
        "datareporting.policy.dataSubmissionPolicyBypassNotification": {
          "type": "boolean"
        },
        "browser.urlbar.suggest.bookmark": {
        "dom.allow_scripts_to_close_windows": {
          "type": "boolean"
        },
        "dom.disable_window_flip": {
@@ -707,9 +762,21 @@
        "dom.keyboardevent.keypress.hack.use_legacy_keycode_and_charcode.addl": {
          "type": "string"
        },
        "extensions.blocklist.enabled": {
          "type": "boolean"
        },
        "extensions.getAddons.showPane": {
          "type": "boolean"
        },
        "geo.enabled": {
          "type": "boolean"
        },
        "intl.accept_languages": {
          "type": "string"
        },
        "media.eme.enabled": {
          "type": "boolean"
        },
        "media.gmp-gmpopenh264.enabled": {
          "type": "boolean"
        },
@@ -725,6 +792,9 @@
        "places.history.enabled": {
          "type": "boolean"
        },
        "print.save_print_settings": {
          "type": "boolean"
        },
        "privacy.file_unique_origin": {
          "type": "boolean"
        },
@@ -734,6 +804,9 @@
        "security.ssl.errorReporting.enabled": {
          "type": "boolean"
        },
        "security.mixed_content.block_active_content": {
          "type": "boolean"
        },
        "ui.key.menuAccessKeyFocuses": {
          "type": "boolean"
        }
+6 −0
Original line number Diff line number Diff line
@@ -121,6 +121,10 @@ const POLICIES_TESTS = [
          SPNEGO: true,
          NTLM: true,
        },
        AllowProxies: {
          SPNEGO: false,
          NTLM: false,
        },
      },
    },
    lockedPrefs: {
@@ -129,6 +133,8 @@ const POLICIES_TESTS = [
      "network.automatic-ntlm-auth.trusted-uris": "a.com, b.com",
      "network.automatic-ntlm-auth.allow-non-fqdn": true,
      "network.negotiate-auth.allow-non-fqdn": true,
      "network.automatic-ntlm-auth.allow-proxies": false,
      "network.negotiate-auth.allow-proxies": false,
    },
  },