Closed Bug 1794579 Opened 3 years ago Closed 3 years ago

Hide private browsing section for SitePermsAddons in about:addon

Categories

(WebExtensions :: General, enhancement, P2)

enhancement

Tracking

(firefox108 fixed)

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: willdurand, Assigned: nchevobbe)

References

Details

(Whiteboard: [addons-jira])

Attachments

(1 file, 1 obsolete file)

From https://phabricator.services.mozilla.com/D158931:

  • properly handle the private browsing checkbox shown in the post-install doorhanger
  • properly handle the about:addons "allow in private browsing tabs" control
Whiteboard: [addons-jira]
Summary: Improve Private Browsing support → Improve Private Browsing support for SitePermsAddonProvider addons

In SitePermsAddonWrapper, we are keeping track of permission with a uniqueness on the permission type.
But for a given permission type and origin, multiple permissions can be set (for PB, contexts, ...).
This patch make it so we bookkeep all the permission that are passed, so we can then later properly
remove them when the addon gets uninstalled, or when individual permission are being revoked.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

Comment on attachment 9298677 [details]
Bug 1794579 - Handle permissions for different origin attributes in SitePermsAddonProvider. r=rpl

Revision D159420 was moved to bug 1795359. Setting attachment 9298677 [details] to obsolete.

Attachment #9298677 - Attachment is obsolete: true
Depends on: 1795359

This patch adds PERM_CAN_CHANGE_PRIVATEBROWSING_ACCESS to SitePermsAddonWrapper#permissions
getter so we show the "Run in private windows" UI in the post-install notification
and in about:addons.
In order to handle changes made to the input, we add a reload method that will
take care of adding/updating/removing permissions depending on the value selected
by the user.

Basically, if the user enable "Run in private windows", we want to add permanent
permissions for private principals, and if the user disable it, we want to remove
any granted permissions on private principals.
On top of that, when the user revoke a permission from a private window, we disable
"Run in private windows" so it's consistent with the user last choice.

Depends on D159569

Attachment #9298970 - Attachment description: Bug 1794579 - Improve Private Browsing support for SitePermsAddonProvider. r=rpl,willdurand. → Bug 1794579 - Improve Private Browsing support for SitePermsAddonProvider. r=rpl.
Severity: -- → N/A
Priority: -- → P2
Summary: Improve Private Browsing support for SitePermsAddonProvider addons → Hide private browsing section for SitePermsAddons in about:addon

as discussed on phabricator with Luca, taking care of the private browsing state for SitePermsAddons might require more work than we thought, so I'm slightly changing the overall goal of this bug so we can enable the provider during this cycle.
I filed Bug 1799090 to address the original issues that were raised on this bug

See Also: → 1799090
Attachment #9298970 - Attachment description: Bug 1794579 - Improve Private Browsing support for SitePermsAddonProvider. r=rpl. → Bug 1794579 - Hide private browsing section for SitePermsAddons in about:addon. r=rpl.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1dd01e4b2ead Hide private browsing section for SitePermsAddons in about:addon. r=rpl.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: