mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 08:45:46 +00:00
Bug 1295151 - Install add-on should not show as a permission in the control center; r=MattN
MozReview-Commit-ID: ChkG0AU743W --HG-- extra : rebase_source : 8893ad623896881f888239b810f90f0449c7637f
This commit is contained in:
parent
63e75ca24b
commit
2088e1ede1
@ -24,6 +24,8 @@ this.SitePermissions = {
|
||||
*
|
||||
* To receive a more detailed, albeit less performant listing see
|
||||
* SitePermissions.getPermissionDetailsByURI().
|
||||
*
|
||||
* install addon permission is excluded, check bug 1303108
|
||||
*/
|
||||
getAllByURI: function (aURI) {
|
||||
let result = [];
|
||||
@ -37,6 +39,10 @@ this.SitePermissions = {
|
||||
|
||||
// filter out unknown permissions
|
||||
if (gPermissionObject[permission.type]) {
|
||||
// XXX Bug 1303108 - Control Center should only show non-default permissions
|
||||
if (permission.type == "install") {
|
||||
continue;
|
||||
}
|
||||
result.push({
|
||||
id: permission.type,
|
||||
state: permission.capability,
|
||||
|
@ -45,6 +45,11 @@ add_task(function* testGetAllByURI() {
|
||||
SitePermissions.remove(uri, "camera");
|
||||
SitePermissions.remove(uri, "desktop-notification");
|
||||
Assert.deepEqual(SitePermissions.getAllByURI(uri), []);
|
||||
|
||||
// XXX Bug 1303108 - Control Center should only show non-default permissions
|
||||
SitePermissions.set(uri, "addon", SitePermissions.BLOCK);
|
||||
Assert.deepEqual(SitePermissions.getAllByURI(uri), []);
|
||||
SitePermissions.remove(uri, "addon");
|
||||
});
|
||||
|
||||
add_task(function* testGetPermissionDetailsByURI() {
|
||||
|
Loading…
Reference in New Issue
Block a user