Closed Bug 1352152 Opened 8 years ago Closed 8 years ago

optional permissions follow-ups

Categories

(WebExtensions :: General, enhancement, P1)

enhancement

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: aswan, Assigned: aswan)

References

Details

(Whiteboard: triaged)

Attachments

(1 file)

A couple of things got overlooked in bug 1197420: - optional permissions are still behind a hidden pref, that pref needs to be flipped on desktop - putting the right strings into the permission prompt got dropped in a rebase, they need to be added - there are some optional permissions that we don't have permission strings for (e.g. cookies, webRequest, etc), we need to add strings for these (but still not show them as required permissions i guess?)
Regarding the third point above, here are the permissions that can be optional permissions but that we don't show permisison strings for as required permissions: "activeTab", "cookies" "idle", "webRequest", "webRequestBlocking" The rationale for not prompting for cookies, webRequest, and webRequestBlocking is that they are always paired with host/origin permissions. The rationale for idle is that it isn't really prone to abuse I guess? (especially without event pages...) I'm not sure about the rationale for activeTab. I'm not sure what we should do when these are requested as optional permissions. Shotgunning some needinfos to solicit opinions.
Flags: needinfo?(sdevaney)
Flags: needinfo?(kmaglione+bmo)
Flags: needinfo?(amckay)
The whole point of the activeTab permission is that it doesn't show a permission string, which should encourage people from using it in preference to <all_urls>. As for what we should do when they're requested, we should probably just silently grant them.
Flags: needinfo?(kmaglione+bmo)
So just because I was unsure, I tried a WebExtension to check the messaging and its not about the permission, but rather the host. Asking for the combinations: "host x", "host x and cookies" and "host x, cookies and webRequest" - all give the same prompt on installation. If adding in a new host prompts for a permission, then I would say we don't need to do anything more about permissions based on hosts.
Flags: needinfo?(amckay)
It sounds like Kris and Andy are both in favor of not showing any prompt at all when an extension calls browser.permissions.request() without any origin permissions and all the regular permissions coming from the list in comment 1. I'd like to double check what Chrome does in this case but this makes sense to me and is easy enough to do...
Flags: needinfo?(aswan)
Flags: needinfo?(sdevaney)
Attachment #8857132 - Flags: review?(kmaglione+bmo)
Whiteboard: triaged
Whoops, meant to comment earlier but Chrome silently grants the permissions from comment 1.
Flags: needinfo?(aswan)
Comment on attachment 8857132 [details] Bug 1352152 Fix several issues with optional webextension permissions https://reviewboard.mozilla.org/r/129064/#review132134 ::: browser/modules/ExtensionsUI.jsm:220 (Diff revision 1) > + // If we don't have any promptable permissions, just proceed > + if (strings.msgs.length == 0) { > + resolve(); > + return; > + } > + Remove whitespace.
Attachment #8857132 - Flags: review?(kmaglione+bmo) → review+
Pushed by aswan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cd0340131a74 Fix several issues with optional webextension permissions r=kmag
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: