зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1739114 - Moved privileged WebExtensions permissions in their own JSONSchema type and added a new custom privileged keyword on each privileged manifest fields. r=robwu,mixedpuppy
This patch includes only the subset of D145687 changes related to the reworked JSONSchema data, plus some minor changes to Schemas.jsm to take the new JSONSchema type ("PrivilegedPermissions") and the new custom JSONSchema keyword (the boolean "privileged" property used to identify manifest fields only allowed in privileged extensions). Besides the changes to the schema data, this patch is not expected to introduce any difference in behavior and so it could also land on its own if needed (and the rest of the changes landed separately). Differential Revision: https://phabricator.services.mozilla.com/D146800
This commit is contained in:
Родитель
f49dc4f09a
Коммит
b928b2d0a8
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
"namespace": "manifest",
|
||||
"types": [{
|
||||
"$extend": "PermissionNoPrompt",
|
||||
"$extend": "PermissionPrivileged",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"$extend": "PermissionNoPrompt",
|
||||
"$extend": "PermissionPrivileged",
|
||||
"choices": [
|
||||
{
|
||||
"type": "string",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"$extend": "PermissionNoPrompt",
|
||||
"$extend": "PermissionPrivileged",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
|
|
@ -1372,6 +1372,7 @@ class Type extends Entry {
|
|||
"deprecated",
|
||||
"preprocess",
|
||||
"postprocess",
|
||||
"privileged",
|
||||
"allowedContexts",
|
||||
"min_manifest_version",
|
||||
"max_manifest_version",
|
||||
|
@ -3764,6 +3765,7 @@ this.Schemas = {
|
|||
"OptionalPermission",
|
||||
"PermissionNoPrompt",
|
||||
"OptionalPermissionNoPrompt",
|
||||
"PermissionPrivileged",
|
||||
]
|
||||
) {
|
||||
const ns = this.getNamespace("manifest");
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
"namespace": "manifest",
|
||||
"types": [{
|
||||
"$extend": "PermissionNoPrompt",
|
||||
"$extend": "PermissionPrivileged",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
"experiment_apis": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "experiments.ExperimentAPI"},
|
||||
"optional": true
|
||||
"optional": true,
|
||||
"privileged": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"optional": true
|
||||
"optional": true,
|
||||
"privileged": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -493,15 +493,26 @@
|
|||
{ "$ref": "MatchPattern" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "PermissionPrivileged",
|
||||
"choices": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"mozillaAddons"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "PermissionNoPrompt",
|
||||
"choices": [
|
||||
{ "$ref": "OptionalPermission" },
|
||||
{ "$ref": "OptionalPermissionNoPrompt" },
|
||||
{ "$ref": "PermissionPrivileged" },
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"alarms",
|
||||
"mozillaAddons",
|
||||
"storage",
|
||||
"unlimitedStorage"
|
||||
]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"$extend": "PermissionNoPrompt",
|
||||
"$extend": "PermissionPrivileged",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
}
|
||||
}
|
||||
},{
|
||||
"$extend": "PermissionNoPrompt",
|
||||
"$extend": "PermissionPrivileged",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
|
Загрузка…
Ссылка в новой задаче