Closed Bug 1754005 Opened 3 years ago Closed 3 months ago

Consider granting temporary ALLOW for site permissions

Categories

(Firefox :: Site Permissions, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
relnote-firefox --- 131+
firefox131 --- fixed

People

(Reporter: pbz, Assigned: pbz)

References

Details

Attachments

(1 file)

Geolocation permission prompts currently are currently one-off. That means for every geolocation request a new prompt is shown and accepting the prompt only grants access for that specific request, unless users check the "remember" checkbox.

We should consider granting temporary ALLOW permissions if users accept geolocation prompts. We do something similar for WebRTC permissions already, see Bug 1693621.

Previously there have been concerns about handing out temporary allows, because they could be abused using sub-frames. However, since we've implemented the Permissions API, geolocation requests can only come from the top BrowsingContext.

From https://permission.site I notice temporary BLOCK permissions already work for the lifetime of the page (*), so hopefully adding ALLOW isn't that different. Safari grants for the duration of the page (without any timeout that I could tell even after several days), so this seems reasonable to me.

*) Modulo that typing

await navigator.permissions.query({name: "geolocation"})

...into web console still yields "prompt" rather than "denied" even after denying location. It should say "denied" to be consistent with the NotAllowedError instead of prompt it will get from for the duration of the page. I suspect fixing this might be the bigger task here perhaps for both?

Assignee: nobody → pbz
Status: NEW → ASSIGNED
Priority: P3 → P2
Summary: Consider granting temporary ALLOW for geolocation prompts → Consider granting temporary ALLOW for site permissions
Attachment #9419489 - Attachment description: Bug 1754005 - Temporary allow for site permissions. r=#permissions! → Bug 1754005 - Temporary allow for site permissions. r=#permissions!,nchevobbe!
Pushed by pzuhlcke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/025f08356074 Temporary allow for site permissions. r=permissions-reviewers,nchevobbe,timhuang
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch

:pbz would you like to nominate this for fx131 release notes? Would be a good call outl

Flags: needinfo?(pbz)

Release Note Request (optional, but appreciated)
[Why is this notable]:
See https://groups.google.com/a/mozilla.org/g/firefox-dev/c/ln6eGfdUPns

[Suggested wording] (not sure how detailed this should be):
Firefox will now temporarily remember when users grant permissions to sites (e.g. geolocation). Temporary permissions get removed after 1 hour or when the tab gets closed.
[Links (documentation, blog post, etc)]:
More details in the email I sent to firefox-dev: https://groups.google.com/a/mozilla.org/g/firefox-dev/c/ln6eGfdUPns

relnote-firefox: --- → ?
Flags: needinfo?(pbz)

Added to Fx131 nightly release notes (takes about 20 min to appear)
https://www.mozilla.org/en-US/firefox/131.0a1/releasenotes/

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: