From 1108a3a6c828634f44d51fbc870f74fd64be205b Mon Sep 17 00:00:00 2001
From: Michael Kaply <345868+mkaply@users.noreply.github.com>
Date: Thu, 25 Jun 2020 13:52:29 -0500
Subject: [PATCH 1/1] Handlers policy
---
README.md | 182 ++++++++++++++++++++++++++++++++++
mac/org.mozilla.firefox.plist | 51 ++++++++++
windows/de-DE/firefox.adml | 6 ++
windows/en-US/firefox.adml | 9 ++
windows/es-ES/firefox.adml | 6 ++
windows/firefox.admx | 7 ++
windows/fr-FR/firefox.adml | 6 ++
windows/it-IT/firefox.adml | 6 ++
windows/zh-TW/firefox.adml | 6 ++
9 files changed, 279 insertions(+)
diff --git a/README.md b/README.md
index 0eed6c5..935f7d7 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,7 @@ Policies can be specified using the [Group Policy templates on Windows](https://
| **[`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.
@@ -2385,6 +2386,187 @@ Value (string):
}
}
```
+
+
+
+### Handlers
+Configure default application handlers. This policy is based on the internal format of `handlers.json`.
+
+You can configure handlers based on a mime type (`mimeTypes`), a file's extension (`extensions`), or a protocol (`schemes`).
+
+Within each handler type, you specify the given mimeType/extension/scheme as a key and use the following subkeys to describe how it is handled.
+
+| Name | Description |
+| --- | --- |
+| `action`| Can be either `saveToDisk`, `useHelperApp`, `useSystemDefault`.
+| `ask` | If `true`, the user is asked if what they want to do with the file. If `false`, the action is taken without user intervention.
+| `handlers` | An array of handlers with the first one being the default. If you don't want to have a default handler, use an empty object for the first handler. Choose between path or uriTemplate.
+| `name` | The display name of the handler (might not be used).
+| `path`| The native path to the executable to be used.
+| `uriTemplate`| A url to a web based application handler. The URL must be https and contain a %s to be used for substitution.
+
+**Compatibility:** Firefox 78, Firefox ESR 78\
+**CCK2 Equivalent:** N/A\
+**Preferences Affected:** N/A
+
+#### Windows (GPO)
+```
+Software\Policies\Mozilla\Firefox\ExtensionSettings (REG_MULTI_SZ) =
+{
+ "mimeTypes": {
+ "application/msword": {
+ "action": "useSystemDefault",
+ "ask": true | 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": "C:\\Program Files (x86)\\Adobe\\Acrobat Reader DC\\Reader\\AcroRd32.exe"
+ }]
+ }
+ }
+}
+```
+#### Windows (Intune)
+OMA-URI:
+```
+./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox/Handlers
+```
+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.
diff --git a/mac/org.mozilla.firefox.plist b/mac/org.mozilla.firefox.plist
index 267a7c9..e0043ed 100644
--- a/mac/org.mozilla.firefox.plist
+++ b/mac/org.mozilla.firefox.plist
@@ -291,6 +291,57 @@
Locked
+ 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
+
+
+
+
+
HardwareAcceleration
Homepage
diff --git a/windows/de-DE/firefox.adml b/windows/de-DE/firefox.adml
index ed90291..c18ff0f 100644
--- a/windows/de-DE/firefox.adml
+++ b/windows/de-DE/firefox.adml
@@ -774,6 +774,12 @@ If this policy is enabled or not configured, the Picture-in-Picture toggle is av
If this policy is disabled, users cannot create a master password.
If this policy is not configured, users can choose to create a master password.
+ Handlers
+ If this policy is enabled, you can use JSON to configure default application handlers.
+
+If this policy is disabled or not configured, Firefox defaults are used.
+
+For detailed information on creating the policy, see https://github.com/mozilla/policy-templates/blob/master/README.md#handlers.
Wenn diese Richtlinieneinstellung aktiviert ist, ist die Einstellung auf true gesperrt. Wenn diese Richtlinieneinstellung deaktiviert ist, ist die Einstellung auf false gesperrt.
Für eine Beschreibung der Einstellung, siehe:
diff --git a/windows/en-US/firefox.adml b/windows/en-US/firefox.adml
index 0e7c78c..9551f53 100644
--- a/windows/en-US/firefox.adml
+++ b/windows/en-US/firefox.adml
@@ -776,6 +776,12 @@ If this policy is enabled or not configured, the Picture-in-Picture toggle is av
If this policy is disabled, users cannot create a master password.
If this policy is not configured, users can choose to create a master password.
+ Handlers
+ If this policy is enabled, you can use JSON to configure default application handlers.
+
+If this policy is disabled or not configured, Firefox defaults are used.
+
+For detailed information on creating the policy, see https://github.com/mozilla/policy-templates/blob/master/README.md#handlers.
If this policy is enabled, the preference is locked to true. If this policy is disabled, the preference is locked to false.
For a description of the preference, see:
@@ -1062,6 +1068,9 @@ https://github.com/mozilla/policy-templates/blob/master/README.md#preferences.
+
+
+
diff --git a/windows/es-ES/firefox.adml b/windows/es-ES/firefox.adml
index 3b7899e..818b56e 100644
--- a/windows/es-ES/firefox.adml
+++ b/windows/es-ES/firefox.adml
@@ -776,6 +776,12 @@ If this policy is enabled or not configured, the Picture-in-Picture toggle is av
If this policy is disabled, users cannot create a master password.
If this policy is not configured, users can choose to create a master password.
+ Handlers
+ If this policy is enabled, you can use JSON to configure default application handlers.
+
+If this policy is disabled or not configured, Firefox defaults are used.
+
+For detailed information on creating the policy, see https://github.com/mozilla/policy-templates/blob/master/README.md#handlers.
Si esta polÃtica está habilitada, la preferencia se bloquea en true. Si esta polÃtica está deshabilitada, la preferencia está bloqueada en false.
Para una descripción de la preferencia, visita:
diff --git a/windows/firefox.admx b/windows/firefox.admx
index d4aea08..0c0c1aa 100644
--- a/windows/firefox.admx
+++ b/windows/firefox.admx
@@ -3627,5 +3627,12 @@
+ ">
+
+
+
+
+
+
diff --git a/windows/fr-FR/firefox.adml b/windows/fr-FR/firefox.adml
index 2b220e8..582c3d9 100644
--- a/windows/fr-FR/firefox.adml
+++ b/windows/fr-FR/firefox.adml
@@ -775,6 +775,12 @@ If this policy is enabled or not configured, the Picture-in-Picture toggle is av
If this policy is disabled, users cannot create a master password.
If this policy is not configured, users can choose to create a master password.
+ Handlers
+ If this policy is enabled, you can use JSON to configure default application handlers.
+
+If this policy is disabled or not configured, Firefox defaults are used.
+
+For detailed information on creating the policy, see https://github.com/mozilla/policy-templates/blob/master/README.md#handlers.
Si cette stratégie est activée, la préférence est verrouillée sur true. Si cette stratégie est désactivée, la préférence est verrouillée sur false.
Pour une description de la préférence, voir:
diff --git a/windows/it-IT/firefox.adml b/windows/it-IT/firefox.adml
index 2793421..391e7e7 100644
--- a/windows/it-IT/firefox.adml
+++ b/windows/it-IT/firefox.adml
@@ -776,6 +776,12 @@ If this policy is enabled or not configured, the Picture-in-Picture toggle is av
If this policy is disabled, users cannot create a master password.
If this policy is not configured, users can choose to create a master password.
+ Handlers
+ If this policy is enabled, you can use JSON to configure default application handlers.
+
+If this policy is disabled or not configured, Firefox defaults are used.
+
+For detailed information on creating the policy, see https://github.com/mozilla/policy-templates/blob/master/README.md#handlers.
Se questo criterio è abilitato, la preferenza è impostata a Vero e resa non modificabile. Se questo criterio è disabilitato, la preferenza è impostata a Falso e resa non modificabile.
Per una descrizione della preferenza, si veda:
diff --git a/windows/zh-TW/firefox.adml b/windows/zh-TW/firefox.adml
index a0c8976..abce331 100644
--- a/windows/zh-TW/firefox.adml
+++ b/windows/zh-TW/firefox.adml
@@ -774,6 +774,12 @@ If this policy is enabled or not configured, the Picture-in-Picture toggle is av
If this policy is disabled, users cannot create a master password.
If this policy is not configured, users can choose to create a master password.
+ Handlers
+ If this policy is enabled, you can use JSON to configure default application handlers.
+
+If this policy is disabled or not configured, Firefox defaults are used.
+
+For detailed information on creating the policy, see https://github.com/mozilla/policy-templates/blob/master/README.md#handlers.
è¥åç¨æ¤ååï¼å好è¨å®å°éå®çº trueãè¥åç¨æ¤ååï¼å好è¨å®åéå®çº falseã
è¥éè¦å好è¨å®ç詳細說æï¼è«åèï¼
--
2.34.1