Investigate how the MV3 permission API works on desktop
Categories
(GeckoView :: Extensions, task)
Tracking
(Not tracked)
People
(Reporter: amejia, Unassigned)
References
Details
(Whiteboard: [geckoview:m111])
Attachments
(1 file)
166.38 KB,
image/png
|
Details |
Key points.
- How we know if the extension requires permissions for a host.
- How we can give temporary access for a host.
- How we can always give access for a host.
- How we can query "Required", "Optional" and "Read and changes website data"
- How we can update an "Optional" permission.
- How we can update "Read and changes website data".
Comment 1•2 years ago
|
||
What are these questions referring to? "Website" as in "what is displayed in the current tab" or as in "a URL"?
The title here references the "permission API". I think that you may either be referring to the permissions
API (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions). But there are also non-API, user-facing ways to change permissions (which extensions can detect by using permissions.onAdded
/onRemoved
). Furthermore, there is also the concept of "active tab" (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions#activetab_permission), in which extensions are granted (scripting) access to a tab without necessarily receiving access to the URL.
Reporter | ||
Comment 2•2 years ago
|
||
Thanks for the details. I was trying to find which APIs we use on the add-ons button in desktop.
Looks like the that information is coming from ExtensionPermissions#OriginControls.
How we know if the extension requires permissions for a host.
How we can give temporary access for a host.
How we can always give access for a host.
How we can query "Required", "Optional" and "Read and changes website data"
An example can be found here
How we can update an "Optional" permission.
Here is an example of how the about:addons
page updates permissions for an add-on
How we can update "Read and changes website data".
An example can be found here
Reporter | ||
Comment 3•2 years ago
|
||
I think we can close this :)
Reporter | ||
Updated•2 years ago
|
Description
•