Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

Allowing the install of themes using policies.json

  • 2 antwurd
  • 1 hat dit probleem
  • 1 werjefte
  • Lêste antwurd fan redgreenblue

more options

I am creating a policies.json file to block all Add ons except ones specified specifically.

I have figured out how to do this for normal extensions, but I have run into issues when applying the same principle to themes. What am I doing wrong? Here is my sample code that works to allow the ublock add on, no problem, but it is not working to allow the matte-black-red theme:

{

 "policies": {
   "ExtensionSettings": {
     "*": {
       "blocked_install_message": "Error message to display",
       "install_sources": [
         "https://addons.mozilla.org/"
       ],
       "installation_mode": "blocked"
     },
     "uBlock0@raymondhill.net": {
       "install_url": "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi",
       "installation_mode": "allowed"
     },
     "{a7589411-c5f6-41cf-8bdc-f66527d9d930}.xpi": {
       "install_url": "https://addons.mozilla.org/firefox/downloads/latest/matte-black-red/latest.xpi",
       "installation_mode": "allowed"
     }
   }
 }

}

I am creating a policies.json file to block all Add ons except ones specified specifically. I have figured out how to do this for normal extensions, but I have run into issues when applying the same principle to themes. What am I doing wrong? Here is my sample code that works to allow the ublock add on, no problem, but it is not working to allow the matte-black-red theme: { "policies": { "ExtensionSettings": { "*": { "blocked_install_message": "Error message to display", "install_sources": [ "https://addons.mozilla.org/" ], "installation_mode": "blocked" }, "uBlock0@raymondhill.net": { "install_url": "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi", "installation_mode": "allowed" }, "{a7589411-c5f6-41cf-8bdc-f66527d9d930}.xpi": { "install_url": "https://addons.mozilla.org/firefox/downloads/latest/matte-black-red/latest.xpi", "installation_mode": "allowed" } } } }

Keazen oplossing

I notice you have add ed the .xpi file extension to the ID

"{a7589411-c5f6-41cf-8bdc-f66527d9d930}.xpi": {
   "install_url": "https://addons.mozilla.org/firefox/downloads/latest/matte-black-red/latest.xpi",
   "installation_mode": "allowed"
}

This should likely be:

"{a7589411-c5f6-41cf-8bdc-f66527d9d930}": {
   "install_url": "https://addons.mozilla.org/firefox/downloads/latest/matte-black-red/latest.xpi",
   "installation_mode": "allowed"
}
Dit antwurd yn kontekst lêze 👍 1

Alle antwurden (2)

more options

Keazen oplossing

I notice you have add ed the .xpi file extension to the ID

"{a7589411-c5f6-41cf-8bdc-f66527d9d930}.xpi": {
   "install_url": "https://addons.mozilla.org/firefox/downloads/latest/matte-black-red/latest.xpi",
   "installation_mode": "allowed"
}

This should likely be:

"{a7589411-c5f6-41cf-8bdc-f66527d9d930}": {
   "install_url": "https://addons.mozilla.org/firefox/downloads/latest/matte-black-red/latest.xpi",
   "installation_mode": "allowed"
}
more options

Yep! That was it. Removing the .xpi fixed the issue. Thank you!