Closed
Bug 1285406
Opened 8 years ago
Closed 8 years ago
Use nsPermissionManager to manage WebExtensions permissions
Categories
(WebExtensions :: Untriaged, defect)
WebExtensions
Untriaged
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: robwu, Unassigned)
Details
I propose to reuse nsPermissionManager to managing addon permissions, because: - It avoids duplication of permission checking logic for APIs that are implemented on the web platform, e.g.: - geolocation - audioCapture, videoCapture (for media device access) - It becomes trivial to implement the optional permissions API (bug 1197420). - It allows us to have one single UI to manage website and add-on permissions. Motivation: While working on bug 1197451, I added a permission check based on the addonId of the SubjectPrincipal(). This did not work in content scripts because apparently the addon ID is only saved in the extra principals of the ExpandedPrincipal. The next obvious step is to add a method HasAddonPermission to the principal that also checks the extra principals, but adding such a method felt weird because permission checking is not addon-specific, but widely used on the web platform (e.g. bug 1105827). And indeed, nsPermissionManager::CommonTestPermission does exactly what I need...
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Comment 1•8 years ago
|
||
I think this has been talked about, but if anyone could provide some detail about why its won't fixed, that would provide a useful record for future people who propose this.
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•