From: Michael Kaply <345868+mkaply@users.noreply.github.com> Date: Thu, 25 Jun 2020 20:51:44 +0000 (-0500) Subject: Merge pull request #628 from mozilla/Handlers X-Git-Tag: v2.0~5 X-Git-Url: https://git.p6c8.net/policy-templates.git/commitdiff_plain/11e5fd7b5b72032d9d1caad762aa87085c98c2e0?ds=inline;hp=-c Merge pull request #628 from mozilla/Handlers Handlers policy --- 11e5fd7b5b72032d9d1caad762aa87085c98c2e0 diff --combined README.md index 243049b,935f7d7..7620f91 --- a/README.md +++ b/README.md @@@ -57,6 -57,7 +57,7 @@@ Policies can be specified using the [Gr | **[`FlashPlugin`](#flashplugin)** | Configure the default Flash plugin policy as well as origins for which Flash is allowed. | **[`FirefoxHome`](#firefoxhome)** | Customize the Firefox Home page. | **[`HardwareAcceleration`](#hardwareacceleration)** | Control hardware acceleration. + | **[`Handlers`](#handlers)** | Configure default application handlers. | **[`Homepage`](#homepage)** | Configure the default homepage and how Firefox starts. | **[`InstallAddonsPermission`](#installaddonspermission)** | Configure the default extension install policy as well as origins for extension installs are allowed. | **[`LegacyProfiles`](#legacyprofiles)** | Disable the feature enforcing a separate profile for each installation. @@@ -2176,10 -2177,9 +2177,10 @@@ The configuration for each extension i |         `force_installed`| The extension is automatically installed and can't be removed by the user. This option is not valid for the default configuration and requires an install_url. |         `normal_installed`| The extension is automatically installed but can be disabled by the user. This option is not valid for the default configuration and requires an install_url. | `install_url`| Maps to a URL indicating where Firefox can download a force_installed or normal_installed extension. If installing from the addons.mozilla.org, use the following URL (substituting SHORT_NAME from the URL on AMO), https://addons.mozilla.org/firefox/downloads/latest/SHORT_NAME/latest.xpi. If installing from the local file system, use a file:/// URL. Languages packs are available from https://releases.mozilla.org/pub/firefox/releases/VERSION/PLATFORM/xpi/LANGUAGE.xpi. -| `install_sources` | Each item in this list is an extension-style match pattern. Users will be able to easily install items from any URL that matches an item in this list. Both the location of the *.xpi file and the page where the download is started from (i.e. the referrer) must be allowed by these patterns. This setting can be used only for the default configuration. +| `install_sources` | A list of sources from which installing extensions is allowed. **This is unnecessary if you are only allowing the installation of certain extensions by ID.** Each item in this list is an extension-style match pattern. Users will be able to easily install items from any URL that matches an item in this list. Both the location of the *.xpi file and the page where the download is started from (i.e. the referrer) must be allowed by these patterns. This setting can be used only for the default configuration. If you want to allow the install of extensions from the recommended add-ons page, you must add `about:addons` to this list. | `allowed_types` | This setting whitelists the allowed types of extension/apps that can be installed in Firefox. The value is a list of strings, each of which should be one of the following: "extension", "theme", "dictionary", "langpack" This setting can be used only for the default configuration. -| `blocked_install_message` | This maps to a string specifying the error message to display to users if they're blocked from installing an extension. This setting allows you to append text to the generic error message displayed when the extension is blocked. This could be be used to direct users to your help desk, explain why a particular extension is blocked, or something else. +| `blocked_install_message` | This maps to a string specifying the error message to display to users if they're blocked from installing an extension. This setting allows you to append text to the generic error message displayed when the extension is blocked. This could be be used to direct users to your help desk, explain why a particular extension is blocked, or something else. This setting can be used only for the default configuration. +| `restricted_domains` | An array of domains on which content scripts can't be run. This setting can be used only for the default configuration. **Compatibility:** Firefox 69, Firefox ESR 68.1\ **CCK2 Equivalent:** N/A\ @@@ -2191,7 -2191,7 +2192,7 @@@ Software\Policies\Mozilla\Firefox\Exten { "*": { "blocked_install_message": "Custom error message.", - "install_sources": ["https://addons.mozilla.org/"], + "install_sources": ["about:addons","https://addons.mozilla.org/"], "installation_mode": "blocked", "allowed_types": ["extension"] }, @@@ -2212,7 -2212,7 +2213,7 @@@ Value (string) + + ``` + #### macOS + ``` + + Handlers + + mimeTypes + + application/msword + + action + useSystemDefault + ask + | + + + schemes + + mailto + + action + useHelperApp + ask + | + handlers + + + name + Gmail + uriTemplate + https://mail.google.com/mail/?extsrc=mailto&url=%s + + + + + extensions + + pdf + + action + useHelperApp + ask + | + handlers + + + name + Adobe Acrobat + path + /System/Applications/Preview.app + + + + + + + ``` + #### policies.json + ``` + { + "mimeTypes": { + "application/msword": { + "action": "useSystemDefault", + "ask": false + } + }, + "schemes": { + "mailto": { + "action": "useHelperApp", + "ask": true | false, + "handlers": [{ + "name": "Gmail", + "uriTemplate": "https://mail.google.com/mail/?extsrc=mailto&url=%s" + }] + } + }, + "extensions": { + "pdf": { + "action": "useHelperApp", + "ask": true | false, + "handlers": [{ + "name": "Adobe Acrobat", + "path": "/usr/bin/acroread" + }] + } + } + } + ``` ### FirefoxHome Customize the Firefox Home page. @@@ -3919,7 -4099,6 +4101,7 @@@ Value (string) ``` +``` #### macOS ```