-
Notifications
You must be signed in to change notification settings - Fork 71
Proposal: initial_permissions
and initial_host_permissions
#883
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
base: main
Are you sure you want to change the base?
Proposal: initial_permissions
and initial_host_permissions
#883
Conversation
Can you also specify whether the browser should prompt the user to add the suppressed hosts? {
"manifest_version": 3,
"initial_host_permissions": ["*://*/*"],
"content_scripts": [{
"scripts": ["main.js"],
"matches": ["*://*/*"]
}]
} I don't want Safari to again start prompting the user to grant each website individually in this case.
|
@fregante the proposal document specifies you can use {
"manifest_version": 3,
"initial_host_permissions": [],
"content_scripts": [{
"scripts": ["main.js"],
"matches": ["*://*/*"]
}]
} Explicitly declaring |
I don't see any mentions of this specific behavior after the installation. It's clear that it won't request them on install, but not that the browser will stay put later. Just to clarify what's currently happening in Safari since 18.4 I think:
More details here: |
@fregante Thanks for clarifying! In general, if declared in If not, |
@carlosjeurissen, thank you for the proposal!
Does the author need to specify permissions twice to benefit from the proposed behavior? Here is an example to illustrate my question. Let's assume the author would like to add a new "nativeMessaging" permission that triggers a warning right now. a) According to the proposal, the new permissions should be added to initial_permissions and permissions, right? {
"initial_permissions": ["nativeMessaging"],
"permissions": ["nativeMessaging"]
} This means:
b) And in case the manifest will contain only "permissions", they will be optional, right? {
"permissions": ["nativeMessaging"]
} This means:
Does it make sense? |
@oleksiilevzhynskyi Thanks for checking the proposal! No, you would not have to add it to both. Specifying it both in Updated the proposal to clarify new permissions added in an update will be treated as For backwards compatibility (IE, handle browsers without Given the following setup: {
"initial_permissions": ["nativeMessaging"],
"optional_permissions": ["bookmarks"]
}
{
"initial_permissions": ["nativeMessaging"],
"permissions": ["nativeMessaging"],
"optional_permissions": ["bookmarks"]
}
{
"initial_permissions": ["nativeMessaging"],
"permissions": ["nativeMessaging"],
"optional_permissions": ["bookmarks"]
} The benefit of this is you can choose this on a per-permission level. Which would be more flexible than a for-all global permission flag. |
4f24086
to
68bcd0d
Compare
initial_permissions
andinitial_host_permissions
will allow extension authors to declare the permissions browsers may prompt extension users at initial installation time. This resolves #227 and could help with #700.Permissions in
initial_permissions
will be prompted to the user on installation similar to the current browser behaviour forpermissions
. With the difference being during an update. If an extension updates with additional permissions ininitial_permissions
, new permissions will not be prompted to existing users. Only to new users. This covers the initial use case of this proposal. This resolves issue #711.In addition, if
initial_permissions
is present and understood by the browser. The prompting behaviour of the permissions key and match patterns in content_scripts will be suppressed. This would allow for maximum backwards compatibility while opening up for the new behaviour for new browser versions. This resolves #116.