Open Bug 2077185 Opened 1 month ago Updated 5 days ago

ExtensionSettings' patternProperties isn't supported by the Policy Visual Editor

Categories

(Enterprise Products :: Console, defect, P2)

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: julienw, Assigned: andip)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

The ExtensionSettings policy doens't allow to add arbitrary entries at the moment. In the future we'll have a custom form for it (bug 2077067), but let's support it minimally for now.

Here is an example that should be supported:

   "ExtensionSettings": {
      "*": {
        "allowed_permissions": [],
        "blocked_install_message": "Be very careful with extensions",
        "install_sources": [
          "https://addons.mozilla.org/*"
        ],
        "installation_mode": "allowed"
      },
      "adguardadblocker@adguard.com": {
        "install_url": "https://addons.mozilla.org/firefox/downloads/latest/adguardadblocker@adguard.com/latest.xpi",
        "installation_mode": "force_installed"
      },
      "https-everywhere@eff.org": {
        "installation_mode": "allowed",
        "updates_disabled": false
      },
      "uBlock0@raymondhill.net": {
        "install_url": "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi",
        "installation_mode": "force_installed"
      }
    },

Regardless of support in the policy editor, the schema itself could also be simplified there a bit without obvious regressions. Instead of

"ExtensionSettings": {
  "type": "object",
  "properties": {
    "*": {
      ...
    }
  },
  ...
  "patternProperties": {
    "^(?!\\*$).*$": {
      "type": "object",
      ...

this would probably suffice:

"ExtensionSettings": {
  "type": "object",
  "properties": {
    "*": {
      ...
    }
  },
  ...
  "additionalProperties": {
    "type": "object",
    ...

This would probably simplify the auto-generation of the UI.

Assignee: felash → apieper
Priority: -- → P2
Status: NEW → ASSIGNED
Attached file GitHub Pull Request —
Blocks: 2074112
Duplicate of this bug: 2072205
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: