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...
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
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.
You need to log in before you can comment on or make changes to this bug.