Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MV3 host permission install prompt #34094

Merged
merged 6 commits into from
Jun 27, 2024

Conversation

rebloor
Copy link
Contributor

@rebloor rebloor commented Jun 13, 2024

Description

Addresses the documentation needed for Bug 1889402 Grant origin permissions during install for mv3, including:

Related issues and pull requests

Related update to the Extension Workshop Manifest V3 migration guide mozilla/extension-workshop#1887

@rebloor rebloor added the Content:WebExt WebExtensions docs label Jun 13, 2024
@rebloor rebloor requested a review from dotproto June 13, 2024 01:44
@rebloor rebloor self-assigned this Jun 13, 2024
@rebloor rebloor requested review from a team as code owners June 13, 2024 01:44
@rebloor rebloor requested review from dipikabh and removed request for a team June 13, 2024 01:44
@github-actions github-actions bot added Content:Firefox Content in the Mozilla/Firefox subtree size/xs [PR only] 0-5 LoC changed labels Jun 13, 2024
Copy link
Contributor

github-actions bot commented Jun 13, 2024

Preview URLs

External URLs (4)

URL: /en-US/docs/Mozilla/Firefox/Releases/127
Title: Firefox 127 for developers


URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/host_permissions
Title: host_permissions

(comment last updated: 2024-06-27 04:16:46)

@@ -41,6 +41,8 @@ Use the `host_permissions` key to request access for the APIs in your extension

Most browsers treat `host_permissions` as optional. If you request permissions using this key, users _may_ get prompted to grant those permissions during installation. As of June 2023, Safari, Firefox, and some Chromium-based browsers don't prompt the user during installation.

> **Note:** From Firefox 127. `host_permissions` for Manifest V3 extensions is considered a required permission and displayed to users during installation. However, if an extension update grants new host permissions, these are not shown to the user. See ([Firefox bug 1893232](https://bugzil.la/1893232))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> **Note:** From Firefox 127. `host_permissions` for Manifest V3 extensions is considered a required permission and displayed to users during installation. However, if an extension update grants new host permissions, these are not shown to the user. See ([Firefox bug 1893232](https://bugzil.la/1893232))
> **Note:** Until Firefox 126, Firefox did not include requested host permissions of Manifest Version 3 extensions in the install prompt. Starting from Firefox 127, host permissions listed in `host_permissions` and `content_scripts` do appear in the install prompt. However, if an extension update requests new host permissions, these are not shown to the user. See ([Firefox bug 1893232](https://bugzil.la/1893232)).

On wording: "required" is not accurate.

The previous paragraph tries to emphasize that host_permissions are optional, and that is still the case: users can revoke them at any time.

The wording as written is technically true but potentially overstating the unreliability of them.

In practice:

  • Chrome shows the permissions in the install prompt.
  • Firefox 127 shows the permissions in the install prompt. Up until Firefox 126, host permissions were not shown in the install prompt. Starting from 127, they are. However, when a new permission is added in an update, Firefox will not show any prompt for it. Extensions who rely on the new host permissions are encouraged to use the permissions.contains API after install (runtime.onInstalled) to check whether the permission has been granted and show an onboarding page if needed.

files/en-us/mozilla/firefox/releases/127/index.md Outdated Show resolved Hide resolved
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Jun 24, 2024
@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Jun 24, 2024
@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Jun 27, 2024
@rebloor rebloor merged commit 81b27da into mdn:main Jun 27, 2024
8 checks passed
@rebloor rebloor deleted the mv3-host-permission-install-prompt branch June 27, 2024 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Firefox Content in the Mozilla/Firefox subtree Content:WebExt WebExtensions docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants