Seneste svar på How to prevent uninstall/removal of add one from toolbar?https://support.mozilla.org/da/questions/12668382019-08-18T12:29:22-07:00Aman said
cor-el said
You only need a comma as separator for multiple items in the array ["<id2019-08-18T12:29:22-07:00aman.kanungo679https://support.mozilla.org/da/questions/1266838#answer-1245271<p><em>Aman <a href="#answer-1245245" rel="nofollow">said</a></em>
</p>
<blockquote>
<em>cor-el <a href="#answer-1245035" rel="nofollow">said</a></em>
<blockquote>
You only need a comma as separator for multiple items in the array ["&lt;id-1&gt;","&lt;id-2&gt;"] and no trialing comma before the closing bracket.
<pre>{
"policies": {
"Extensions": {
"Locked": ["{dd3d7613-0246-469d-bc65-2a3cc1668adc}"]
}
}
}</pre>
</blockquote>
<p>It doesn't seem to be working for me. If I go to the Firefox Addon page, I can simply click remove and it removes it.
</p>
</blockquote>
<p>Also, to clarify, If I have the locked function in my .json file, It should prevent any ability to "remove extension" if Firefox is up to date?
</p>If you mean the extension's page on the AMO (Add-ons) website then this is likely this bug that was 2019-08-18T12:08:58-07:00cor-elhttps://support.mozilla.org/da/questions/1266838#answer-1245267<p>If you mean the extension's page on the AMO (Add-ons) website then this is likely this bug that was recently fixed for Firefox 68.1 ESR (and 69/70).
</p>
<ul><li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1568921" rel="nofollow">Bug 1568921</a> - <a href="http://Addons.mozilla.org" rel="nofollow">Addons.mozilla.org</a> can uninstall add-ons locked with policies
</li></ul>
<p>(<i>please do not comment in bug reports<br><a href="https://bugzilla.mozilla.org/page.cgi?id=etiquette.html" rel="nofollow">https://bugzilla.mozilla.org/page.cgi?id=etiquette.html</a></i>)
</p>cor-el said
You only need a comma as separator for multiple items in the array ["<id-1>","&l2019-08-18T11:14:44-07:00aman.kanungo679https://support.mozilla.org/da/questions/1266838#answer-1245245<p><em>cor-el <a href="#answer-1245035" rel="nofollow">said</a></em>
</p>
<blockquote>
You only need a comma as separator for multiple items in the array ["&lt;id-1&gt;","&lt;id-2&gt;"] and no trialing comma before the closing bracket.
<pre>{
"policies": {
"Extensions": {
"Locked": ["{dd3d7613-0246-469d-bc65-2a3cc1668adc}"]
}
}
}</pre>
</blockquote>
<p>It doesn't seem to be working for me. If I go to the Firefox Addon page, I can simply click remove and it removes it.
</p>You only need a comma as separator for multiple items in the array ["<id-1>","<id-2>"] a2019-08-17T17:39:17-07:00cor-elhttps://support.mozilla.org/da/questions/1266838#answer-1245035<p>You only need a comma as separator for multiple items in the array ["&lt;id-1&gt;","&lt;id-2&gt;"] and no trialing comma before the closing bracket.
</p>
<pre>{
"policies": {
"Extensions": {
"Locked": ["{dd3d7613-0246-469d-bc65-2a3cc1668adc}"]
}
}
}</pre>jscher2000 said
Aman said
cor-el said
Aman said
Here's what my code looks like:
{
"policies":2019-08-17T13:22:40-07:00aman.kanungo679https://support.mozilla.org/da/questions/1266838#answer-1245015<p><em>jscher2000 <a href="#answer-1244838" rel="nofollow">said</a></em>
</p>
<blockquote>
<em>Aman <a href="#answer-1244822" rel="nofollow">said</a></em>
<blockquote>
<em>cor-el <a href="#answer-1244808" rel="nofollow">said</a></em>
<blockquote>
<em>Aman <a href="#answer-1244800" rel="nofollow">said</a></em>
<blockquote>Here's what my code looks like:
<pre>{
"policies": {
"Extensions": {
"Locked": ["addon_id@mozilla.org"]
}
}
}
</pre>
<p>Not sure what I'm doing wrong.
</p>
</blockquote>You need to replace "addon_id@mozilla.org" with the actual ID of the extension that you want to lock.
<p>Easiest to get the ID is to install the extension and look for it on the about:debugging page.
</p>
</blockquote>
<p>Would this be something I'd have to do for each individual add on?
Also, would the code still work if I list every extension control parameters in the same bracket?
</p>
</blockquote>
<p>The [] holds an array, which is a comma-separated list of quoted items. So for example:
</p><p>[ "{73a6fe31-595d-460b-a920-fcc0f8843232}", "jid1-93WyvpgvxzGATw@jetpack",
"savepage-we@DW-dev" ]
</p><p>To get the IDs, you also can consult the Extensions section of the Troubleshooting Information page. Either:
</p>
<ul><li> "3-bar" menu button &gt; "?" Help &gt; Troubleshooting Information
</li><li> (menu bar) Help &gt; Troubleshooting Information
</li><li> type or paste <strong>about:support</strong> in the address bar and press Enter
</li></ul>
<p>Scroll down past "Application Basics" and "Firefox Features" to "Extensions". The friendly name is on the left and the ID is on the right.
</p>
</blockquote>
<p>Here is what I currently have:
</p><p><br>
{
</p><pre> "policies": {
"Extensions": {
"Locked": ["{dd3d7613-0246-469d-bc65-2a3cc1668adc}, "]
}
}
</pre>
<p>}
</p><p>Not sure if it's right.
</p>jscher2000 said
Aman said
jscher2000 said
Aman said
I've got ahead and made a notepad file with2019-08-16T11:47:14-07:00aman.kanungo679https://support.mozilla.org/da/questions/1266838#answer-1244845<p><em>jscher2000 <a href="#answer-1244834" rel="nofollow">said</a></em>
</p>
<blockquote>
<em>Aman <a href="#answer-1244826" rel="nofollow">said</a></em>
<blockquote>
<em>jscher2000 <a href="#answer-1244812" rel="nofollow">said</a></em>
<blockquote>
<em>Aman <a href="#answer-1244800" rel="nofollow">said</a></em>
<blockquote>
I've got ahead and made a notepad file with the Extension control code in my Firefox Distribution folder, but it didn't seem to work.
</blockquote>
<p>By the way, if Windows says your <strong>policies.json</strong> file is a Notepad or Text file, there could be a hidden .txt extension on the file name. To take firmer control of file naming, you could set Windows to show all file extensions, at least temporarily.
</p><p><a href="https://www.bleepingcomputer.com/tutorials/how-to-show-file-extensions-in-windows/" rel="nofollow">https://www.bleepingcomputer.com/tutorials/how-to-show-file-extensions-in-windows/</a>
</p>
</blockquote>
<p>Thanks, but I already had that option enabled. I did add the .txt to the end though.
</p>
</blockquote>
<p>Sorry, you do not want .txt at the end. You want .json to be the true file extension.
</p>
</blockquote>
<p>Ah ok, will make that change.
</p>Aman said
cor-el said
Aman said
Here's what my code looks like:
{
"policies": {
"Extension2019-08-16T10:42:48-07:00jscher2000https://support.mozilla.org/da/questions/1266838#answer-1244838<p><em>Aman <a href="#answer-1244822" rel="nofollow">said</a></em>
</p>
<blockquote>
<em>cor-el <a href="#answer-1244808" rel="nofollow">said</a></em>
<blockquote>
<em>Aman <a href="#answer-1244800" rel="nofollow">said</a></em>
<blockquote>Here's what my code looks like:
<pre>{
"policies": {
"Extensions": {
"Locked": ["addon_id@mozilla.org"]
}
}
}
</pre>
<p>Not sure what I'm doing wrong.
</p>
</blockquote>You need to replace "addon_id@mozilla.org" with the actual ID of the extension that you want to lock.
<p>Easiest to get the ID is to install the extension and look for it on the about:debugging page.
</p>
</blockquote>
<p>Would this be something I'd have to do for each individual add on?
Also, would the code still work if I list every extension control parameters in the same bracket?
</p>
</blockquote>
<p>The [] holds an array, which is a comma-separated list of quoted items. So for example:
</p><p>[ "{73a6fe31-595d-460b-a920-fcc0f8843232}", "jid1-93WyvpgvxzGATw@jetpack",
"savepage-we@DW-dev" ]
</p><p>To get the IDs, you also can consult the Extensions section of the Troubleshooting Information page. Either:
</p>
<ul><li> "3-bar" menu button &gt; "?" Help &gt; Troubleshooting Information
</li><li> (menu bar) Help &gt; Troubleshooting Information
</li><li> type or paste <strong>about:support</strong> in the address bar and press Enter
</li></ul>
<p>Scroll down past "Application Basics" and "Firefox Features" to "Extensions". The friendly name is on the left and the ID is on the right.
</p>Aman said
jscher2000 said
Aman said
I've got ahead and made a notepad file with the Extension co2019-08-16T10:35:54-07:00jscher2000https://support.mozilla.org/da/questions/1266838#answer-1244834<p><em>Aman <a href="#answer-1244826" rel="nofollow">said</a></em>
</p>
<blockquote>
<em>jscher2000 <a href="#answer-1244812" rel="nofollow">said</a></em>
<blockquote>
<em>Aman <a href="#answer-1244800" rel="nofollow">said</a></em>
<blockquote>
I've got ahead and made a notepad file with the Extension control code in my Firefox Distribution folder, but it didn't seem to work.
</blockquote>
<p>By the way, if Windows says your <strong>policies.json</strong> file is a Notepad or Text file, there could be a hidden .txt extension on the file name. To take firmer control of file naming, you could set Windows to show all file extensions, at least temporarily.
</p><p><a href="https://www.bleepingcomputer.com/tutorials/how-to-show-file-extensions-in-windows/" rel="nofollow">https://www.bleepingcomputer.com/tutorials/how-to-show-file-extensions-in-windows/</a>
</p>
</blockquote>
<p>Thanks, but I already had that option enabled. I did add the .txt to the end though.
</p>
</blockquote>
<p>Sorry, you do not want .txt at the end. You want .json to be the true file extension.
</p>jscher2000 said
Aman said
I've got ahead and made a notepad file with the Extension control code 2019-08-16T10:20:30-07:00aman.kanungo679https://support.mozilla.org/da/questions/1266838#answer-1244826<p><em>jscher2000 <a href="#answer-1244812" rel="nofollow">said</a></em>
</p>
<blockquote>
<em>Aman <a href="#answer-1244800" rel="nofollow">said</a></em>
<blockquote>
I've got ahead and made a notepad file with the Extension control code in my Firefox Distribution folder, but it didn't seem to work.
</blockquote>
<p>By the way, if Windows says your <strong>policies.json</strong> file is a Notepad or Text file, there could be a hidden .txt extension on the file name. To take firmer control of file naming, you could set Windows to show all file extensions, at least temporarily.
</p><p><a href="https://www.bleepingcomputer.com/tutorials/how-to-show-file-extensions-in-windows/" rel="nofollow">https://www.bleepingcomputer.com/tutorials/how-to-show-file-extensions-in-windows/</a>
</p>
</blockquote>
<p>Thanks, but I already had that option enabled. I did add the .txt to the end though.
</p>cor-el said
You need to replace "addon_id@mozilla.org" with the actual ID of the extension that yo2019-08-16T10:15:20-07:00aman.kanungo679https://support.mozilla.org/da/questions/1266838#answer-1244822<p><em>cor-el <a href="#answer-1244808" rel="nofollow">said</a></em>
</p>
<blockquote>
You need to replace "addon_id@mozilla.org" with the actual ID of the extension that you want to lock.
Easiest to get the ID is to install the extension and look for it on the about:debugging page.
</blockquote>
<p>Would this be something I'd have to do for each individual add on?
Also, would the code still work if I list every extension control parameters in the same bracket?
</p>Aman said
I've got ahead and made a notepad file with the Extension control code in my Firefox Dis2019-08-16T09:46:48-07:00jscher2000https://support.mozilla.org/da/questions/1266838#answer-1244812<p><em>Aman <a href="#answer-1244800" rel="nofollow">said</a></em>
</p>
<blockquote>
I've got ahead and made a notepad file with the Extension control code in my Firefox Distribution folder, but it didn't seem to work.
</blockquote>
<p>By the way, if Windows says your <strong>policies.json</strong> file is a Notepad or Text file, there could be a hidden .txt extension on the file name. To take firmer control of file naming, you could set Windows to show all file extensions, at least temporarily.
</p><p><a href="https://www.bleepingcomputer.com/tutorials/how-to-show-file-extensions-in-windows/" rel="nofollow">https://www.bleepingcomputer.com/tutorials/how-to-show-file-extensions-in-windows/</a>
</p>You need to replace "addon_id@mozilla.org" with the actual ID of the extension that you want to lock2019-08-16T09:39:54-07:00cor-elhttps://support.mozilla.org/da/questions/1266838#answer-1244808<p>You need to replace "addon_id@mozilla.org" with the actual ID of the extension that you want to lock.
Easiest to get the ID is to install the extension and look for it on the about:debugging page.
</p>@cor-el
Hi,
Thanks for reply.
I've got ahead and made a notepad file with the Extension control code2019-08-16T08:39:58-07:00aman.kanungo679https://support.mozilla.org/da/questions/1266838#answer-1244800<p>@cor-el
</p><p>Hi,
</p><p>Thanks for reply.
</p><p>I've got ahead and made a notepad file with the Extension control code in my Firefox Distribution folder, but it didn't seem to work.
</p><p>Here's what my code looks like:
</p><p>{
</p><pre> "policies": {
"Extensions": {
"Locked": ["addon_id@mozilla.org"]
}
}
</pre>
<p>}
</p><p>Not sure what I'm doing wrong.
</p>You can lock extensions to prevent them from being removed and you can lock access to the about:addo2019-08-16T04:51:45-07:00cor-elhttps://support.mozilla.org/da/questions/1266838#answer-1244728<p>You can lock extensions to prevent them from being removed and you can lock access to the about:addons page via a policies.json file.
</p>
<ul><li><a href="https://support.mozilla.org/en-US/kb/customizing-firefox-using-policiesjson" rel="nofollow">https://support.mozilla.org/en-US/kb/customizing-firefox-using-policiesjson</a>
</li><li><a href="https://github.com/mozilla/policy-templates/blob/master/README.md" rel="nofollow">https://github.com/mozilla/policy-templates/blob/master/README.md</a>
</li></ul>