Closed Bug 1330823 Opened 5 years ago Closed 4 years ago

Display permissions prompt for interactive webextensions updates


(Toolkit :: Add-ons Manager, defect, P2)

51 Branch



Tracking Status
firefox54 --- verified


(Reporter: aswan, Assigned: aswan)



(Whiteboard: triaged)


(2 files)

Bug 1317470 covers the flow when a webextension is updated in the background, but of course updates that are manually applied take a totally different code path.  They are also done interactively so they presumably should show the permission prompt immediately rather than putting a badge on the hamburger menu and forcing the user to go through another indirect step to view and accept the new permissions.
This bug is to handle that flow.
Whiteboard: triaged
Priority: -- → P2
Attachment #8832737 - Flags: review?(rhelmer)
Attachment #8832738 - Flags: review?(rhelmer)
Attachment #8832738 - Flags: review?(florian)
For part 2, comments from either of you on either part are welcome but I r?'ed both of you so Rob could look at the extensions.js change and Florian could look at the test
Comment on attachment 8832738 [details]
Bug 1330823 Part 2 permission prompts for interactive extension updates

I reviewed the test and no issue jumped at me, but I'm not really familiar with the install apis, so I would prefer if Rob could have a quick look at the test too.
Attachment #8832738 - Flags: review?(florian) → review+
Attachment #8832737 - Flags: review?(rhelmer) → review?(dtownsend)
Attachment #8832738 - Flags: review?(rhelmer) → review?(dtownsend)
Comment on attachment 8832737 [details]
Bug 1330823 Part 1 refactor some existing permissions code

::: toolkit/components/extensions/Extension.jsm:394
(Diff revision 1)
>      return result;
>    }
> +  // Compute the difference between two sets of permissions, suitable
> +  // for presenting to the user.
> +  static newPermissions(oldPermissions, newPermissions) {

I'd suggest comparePermissions as the name for this function.
Attachment #8832737 - Flags: review?(dtownsend) → review+
Comment on attachment 8832738 [details]
Bug 1330823 Part 2 permission prompts for interactive extension updates

This looks ok, my only concern is the case where a check for updates yields more than one add-on with an update. I don't know how good the prompt will look in that case.
Attachment #8832738 - Flags: review?(dtownsend) → review+
Multiple simultaneous updates will get addressed over in bug 1329884
Pushed by
Part 1 refactor some existing permissions code r=mossop
Part 2 permission prompts for interactive extension updates r=florian,mossop
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Confirm that permissions are successfully prompted for interactive webextensions updates but encountered 3 new issues:
  - Bug 1340078 - Old permissions are reposted in interactive webextension update pop-up
  - Bug 1340102 - No updates found after closing the Add-ons Manager tab which displays the interactive update pop-up
  - Bug 1340109 - ”No updates found” message is displayed after canceling the interactive update pop-up

Tested on Firefox 54.0a1 (2016-02-15) under Windows 10 64-bit, Mac OS X 10.12.1 and Ubuntu 16.04 32-bit.

Based on this testing, I am marking this bug as Verified since the other issues are tracked separately.
Blocks: 1340471
You need to log in before you can comment on or make changes to this bug.