Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Allowing the install of themes using policies.json

  • 2 (ردّان اثنان)
  • 1 has this problem
  • 1 view
  • آخر ردّ كتبه 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" } } } }

الحل المُختار

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"
}
Read this answer in context 👍 1

All Replies (2)

more options

الحل المُختار

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!