Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

How to block extension using policies.json

  • 3 trả lời
  • 0 gặp vấn đề này
  • 706 lượt xem
  • Trả lời mới nhất được viết bởi Jonathan

more options

Hi, I planned to block my users from installing extensions/add-ons. I found an article that might be the answer (https://support.mozilla.org/en-US/questions/1308646). I tried to create a simple policy (below), but somehow it does not work (I can still install any add-on/extension). What is wrong with my script? I'm using Firefox ESR 78.11.0 (64-bit) by the way.

My "policies.json" looks like this:

{

"policies": {
  "ExtensionSettings": {
    "*": {
      "blocked_install_message": "Blocked!",
      "install_sources": ["https://addons.mozilla.org/"],
      "installation_mode": "blocked"
    }
  }
}

Sincerely, Jonathan

Hi, I planned to block my users from installing extensions/add-ons. I found an article that might be the answer (https://support.mozilla.org/en-US/questions/1308646). I tried to create a simple policy (below), but somehow it does not work (I can still install any add-on/extension). What is wrong with my script? I'm using Firefox ESR 78.11.0 (64-bit) by the way. My "policies.json" looks like this: { "policies": { "ExtensionSettings": { "*": { "blocked_install_message": "Blocked!", "install_sources": ["https://addons.mozilla.org/"], "installation_mode": "blocked" } } } Sincerely, Jonathan

Giải pháp được chọn

See:

Note that your curly brackets do not match as you need to add one more '}'. You should see an error on about:policies#errors.

{
 "policies": {
  "ExtensionSettings": {
    "*": {
      "blocked_install_message": "Blocked!",
      "install_sources": ["https://addons.mozilla.org/"],
      "installation_mode": "blocked"
    }
  }.
 }
}

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (3)

more options
more options

Giải pháp được chọn

See:

Note that your curly brackets do not match as you need to add one more '}'. You should see an error on about:policies#errors.

{
 "policies": {
  "ExtensionSettings": {
    "*": {
      "blocked_install_message": "Blocked!",
      "install_sources": ["https://addons.mozilla.org/"],
      "installation_mode": "blocked"
    }
  }.
 }
}

more options

Cor-El, thank you --- just realized that I missed 1 "}".

Sincerely, Jonathan.