Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

ExtensionSettings policy

  • 5 ответов
  • 0 имеют эту проблему
  • 155 просмотров
  • Последний ответ от Damon

more options

We're exploring adopting a default deny policy for Firefox extensions in our enterprise. However when I tested this by creating a custom policies.json Firefox unexpectedly removed all extensions for me, including the ones I thought I had allow listed. Here is my policies.json but just keeping in the Facebook Container add-on to illustrate:

{

   "policies": {
       "ExtensionSettings": {
           "*": {
               "blocked_install_message": "Only approved Firefox extensions can be installed, please email your request to itdept@example.org",
               "installation_mode": "blocked",
               "allowed_types": ["theme", "dictionary", "locale"]
           },
           "@contain-facebook.xpi": { "installation_mode": "allowed" }
       }
   }

}

What I would like is to to allow pre-approved extensions (including if they already are installed) and all other types of add-on, but remove and prohibit installation of unapproved extensions.

Can anyone assist, please?

We're exploring adopting a default deny policy for Firefox extensions in our enterprise. However when I tested this by [[Customize Firefox using policies.json|creating a custom policies.json]] Firefox unexpectedly removed all extensions for me, including the ones I thought I had allow listed. Here is my policies.json but just keeping in the Facebook Container add-on to illustrate: { "policies": { "ExtensionSettings": { "*": { "blocked_install_message": "Only approved Firefox extensions can be installed, please email your request to itdept@example.org", "installation_mode": "blocked", "allowed_types": ["theme", "dictionary", "locale"] }, "@contain-facebook.xpi": { "installation_mode": "allowed" } } } } What I would like is to to allow pre-approved extensions (including if they already are installed) and all other types of add-on, but remove and prohibit installation of unapproved extensions. Can anyone assist, please?

Выбранное решение

So if you remove

             "installation_mode": "blocked",

It should work as you expect.

The allowed_types line is effectively acting as if everything is blocked.

That being said, there probably is a bug here, because blocking everything causes other things to happen, and you probably want that.

Прочитайте этот ответ в контексте 👍 1

Все ответы (5)

more options

It's this line:

              "allowed_types": ["theme", "dictionary", "locale"]

You really don't even need that, so you can just remove.

The problem is you didn't put extensions on that list so they aren't allowed...

And also the ID for the Facebook container is just @contain-facebook

I wrote an extension that helps you find IDs from any page on AMO:

https://github.com/mkaply/queryamoid/releases/tag/v0.2

more options

Thanks, Mike. Rookie mistake with the ID. I actually ended up following this StackOverflow advice to use about:debugging which seems to achieve the same.

However I still can't get allowed_types to work the way I think it should. What I want to happen is default allow for all dictionary, locale and theme add-ons, but default deny for extension add-ons unless the ID is included explicitly. My reading of the documentation is

"*": { "allowed_types": ["theme", "dictionary", "locale"] }

should provide for this. So for example the below configuration allows the Facebook Container extension but denies all other add-ons including dictionaries, when what I want is for all dictionaries to be allowed:

{

  "policies": {
      "ExtensionSettings": {
          "*": {
              "blocked_install_message": "Only approved Firefox extensions can be installed, please email your request to itdept@example.org",
              "installation_mode": "blocked",
              "allowed_types": ["dictionary"]
          },
          "@contain-facebook": { "installation_mode": "allowed" }
      }
  }

}

more options

Выбранное решение

So if you remove

             "installation_mode": "blocked",

It should work as you expect.

The allowed_types line is effectively acting as if everything is blocked.

That being said, there probably is a bug here, because blocking everything causes other things to happen, and you probably want that.

more options

My recollection is that I tested this against Chrome and it worked the same, but I'll double check.

more options

Thanks, now I understand. For the archives, this is what works for me:

{

   "policies":
   {
       "ExtensionSettings": {
           "*": {
               "blocked_install_message": "Only approved Firefox extensions can be installed, please email your request to itdept@example.org",
               "allowed_types": ["theme", "dictionary", "locale"]
           },
           "@contain-facebook": { "installation_mode": "allowed" }
       }
   }

}

Задать вопрос

Для ответа на сообщения вы должны войти в свою учётную запись. Пожалуйста, задайте новый вопрос, если у вас ещё нет учётной записи.