Closed Bug 1693621 Opened 3 years ago Closed 3 years ago

Allow SitePermissions to store "temporary allow" state

Categories

(Firefox :: Site Permissions, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: mconley, Assigned: pbz)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: [proton-door-hangers])

Attachments

(5 files)

SitePermissions doesn't currently allow us to do temporary allow. We're going to need this ability in order to improve some of our WebRTC permission UX.

What we're effectively looking for is for SitePermissions to be able to remember that a particular camera or microphone device was permitted for a particular domain in a <browser>, for a period of time.

Perhaps importantly, any kind of "deny" on the top-level frame domain should probably override any temporary allow for any device on any subframe in that browser.

Depends on: 1693644
No longer depends on: 1693644
Blocks: 1693677
Severity: -- → N/A
Priority: -- → P2
Assignee: nobody → pbz
Status: NEW → ASSIGNED

This enables setting temporary permissions with state SitePermissions.ALLOW.
In order to safely support this it updates the temporary permission map
to key non-BLOCK permissions by URI prePath. BLOCK permissions are still
keyed by baseDomain to prevent DoS.

  • Added a permission setter argument to pass custom expiry time.
  • Refactored TemporaryPermissions to use timeouts instead of timestamps.
    This is needed, so we directly get a callback once a permission expires
    and can notify the UI.
    Previously we would only knew if a permission expired if we called the getter.

Depends on D105982

Depends on D105983

As per guidance from Vicky, for tracking, we're marking all the bugs that people are working on as P1.

Priority: P2 → P1
Pushed by pzuhlcke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0c4a60f7d65b
Temporary ALLOW SitePermissions. r=johannh
https://hg.mozilla.org/integration/autoland/rev/546ecbe4699f
Support custom expiry times for temporary SitePermissions. r=johannh
https://hg.mozilla.org/integration/autoland/rev/79ebd82c278d
Added option to pass custom URI for setting temporary permissions. r=johannh
https://hg.mozilla.org/integration/autoland/rev/2ee50cd896d8
Only clear temporary block permissions on user reload. r=johannh
https://hg.mozilla.org/integration/autoland/rev/c93e212cd0dd
Tests for new SitePermissions expiry behavior. r=johannh
Depends on: 1712957
Blocks: 1713578
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: