This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

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

Hierdie gesprek is in die argief. Vra asseblief 'n nuwe vraag as jy hulp nodig het.

Request permissions rather than requiring them

more options

Is there a way to make a request for extra permissions rather than requiring them? I want to add functionality, but since my extension is more privacy oriented, there's concern when I added extra permission. https://addons.mozilla.org/en-US/firefox/addon/volume-control-boost-volume/

Is there a way to make a request for extra permissions rather than requiring them? I want to add functionality, but since my extension is more privacy oriented, there's concern when I added extra permission. https://addons.mozilla.org/en-US/firefox/addon/volume-control-boost-volume/

All Replies (12)

more options

Best it to take this to the Mozilla Discourse forum site.

more options
more options

jscher2000 - Support Volunteer said

Can you give an example of what kind of permission you want to add? You can use the "optional_permissions" key in your manifest. As an example: Ref. https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/optional_permissions

Thanks your response is most helpful. The new permission required is “all site data”, so my extension can view iframes allowing it to work on way more sites

more options

jscher2000 - Support Volunteer said

Can you give an example of what kind of permission you want to add? You can use the "optional_permissions" key in your manifest. As an example: Ref. https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/optional_permissions

If you have the time to amend it that would be a very nice contribution https://github.com/Chaython/volumecontrol

more options

Chaython said

The new permission required is “all site data”, so my extension can view iframes allowing it to work on way more sites

I think you can write that as

"optional_permissions": ["<all_urls>"]

but I don't think I've ever tested that.

more options

jscher2000 - Support Volunteer said

Chaython said

The new permission required is “all site data”, so my extension can view iframes allowing it to work on way more sites

I think you can write that as

"optional_permissions": ["<all_urls>"]

but I don't think I've ever tested that.

The suggestion did add it to the optional permissions, but it's still putting it as a required permission regardless.

more options

Chaython said

jscher2000 - Support Volunteer said

Chaython said

The new permission required is “all site data”, so my extension can view iframes allowing it to work on way more sites

I think you can write that as

"optional_permissions": ["<all_urls>"]

but I don't think I've ever tested that.

The suggestion did add it to the optional permissions, but it's still putting it as a required permission regardless.

Do you still have a copy of the signed XPI that causes this?

more options

I don't have a signed XPI, I deleted the package after I got emails complaining of the new permission requirement. With the optional permission set, I only ran it in about:Debugging it showed the permission as required and also as optional... However for some reason despite not requesting the permission, it's used in the permission list. The issue doesn't persist in Manifest V3, but I haven't published it yet. Because it warns Manifest v3 isn't supported by many firefox revisions.

more options

Actually in about:Debugging the extension, shows all urls as optional, but after uploading the extension it shows all site data required on the extension page.

https://addons.mozilla.org/en-US/firefox/addon/volume-control-boost-volume/

jscher2000 - Support Volunteer said

Chaython said

jscher2000 - Support Volunteer said

Chaython said

The new permission required is “all site data”, so my extension can view iframes allowing it to work on way more sites

I think you can write that as

"optional_permissions": ["<all_urls>"]

but I don't think I've ever tested that.

The suggestion did add it to the optional permissions, but it's still putting it as a required permission regardless.

Do you still have a copy of the signed XPI that causes this?

more options

Firefox understands that it's an optional permission: I'm not prompted to approve that permission when I install the add-on, and it shows as optional on the Add-ons page, Permissions panel.

So it looks like a bug in the Add-ons site. I didn't see anything similar mentioned here: https://github.com/mozilla/addons/issues

Before filing a new bug report, could you try something: split your two permissions like this to see whether it makes any difference:

 "permissions": ["activeTab"],
 "optional_permissions": ["<all_urls>"],
 

Or maybe you already tested that.

more options

jscher2000 - Support Volunteer said

Firefox understands that it's an optional permission: I'm not prompted to approve that permission when I install the add-on, and it shows as optional on the Add-ons page, Permissions panel. So it looks like a bug in the Add-ons site. I didn't see anything similar mentioned here: https://github.com/mozilla/addons/issues Before filing a new bug report, could you try something: split your two permissions like this to see whether it makes any difference: "permissions": ["activeTab"], "optional_permissions": ["<all_urls>"], Or maybe you already tested that.

I didnt work with manifest v2 so I didnt bother in v3, the all_urls seems to be a parent permission of activetab / activetab is present for all extensions (no notification of its presence is active in the extension)

more options

My other thought was that the matches list of the content_scripts key is equivalent to "<all_urls>" but I don't know whether that should be considered in Manifest V3.