Bug 1245376 - do not show hidden add-ons on manual update page f?mossop
The public method hidden() is checking that the installLocation is not
for system or temporary add-ons - I don't see anywhere that locked install
locations are exposed in the public API, do you think this is sufficient for
this bug or should locked install locations be exposed?
I think that `extensions.js` is already skipping update checks for add-ons
without PERM_CAN_UPGRADE in e.g. https://dxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/content/extensions.js#1049 but correct me if I am mistaken.
The trickier part here is adding a test - providers are mocked in the
mochitests, I expect we just need to mock this as well, thought I'd ask for
feedback on the above while I work this out.
MozReview-Commit-ID: IZBefNH45Fl
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -3581,16 +3581,20 @@ var gUpdatesView = {
}
var elements = [];
for (let install of aInstallsList) {
if (!this.isManualUpdate(install))
continue;
+ // honor add-ons which should be hidden.
+ if (install.hidden)
+ continue;
+
let item = createItem(install.existingAddon);
item.setAttribute("upgrade", true);
item.addEventListener("IncludeUpdateChanged", () => {
this.maybeDisableUpdateSelected();
}, false);
elements.push(item);
}