You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changed the capability format to allow configuring both `remote: { urls: Vec<String> }` and `local: bool (default: true)` instead of choosing one on the `context` field.
Copy file name to clipboardExpand all lines: core/tauri-config-schema/schema.json
+26-40Lines changed: 26 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -1085,15 +1085,22 @@
1085
1085
"default": "",
1086
1086
"type": "string"
1087
1087
},
1088
-
"context": {
1089
-
"description": "Execution context of the capability.\n\nAt runtime, Tauri filters the IPC command together with the context to determine whether it is allowed or not and its scope.",
1090
-
"default": "local",
1091
-
"allOf": [
1088
+
"remote": {
1089
+
"description": "Configure remote URLs that can use the capability permissions.",
1090
+
"anyOf": [
1092
1091
{
1093
-
"$ref": "#/definitions/CapabilityContext"
1092
+
"$ref": "#/definitions/CapabilityRemote"
1093
+
},
1094
+
{
1095
+
"type": "null"
1094
1096
}
1095
1097
]
1096
1098
},
1099
+
"local": {
1100
+
"description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.",
1101
+
"default": true,
1102
+
"type": "boolean"
1103
+
},
1097
1104
"windows": {
1098
1105
"description": "List of windows that uses this capability. Can be a glob pattern.\n\nOn multiwebview windows, prefer [`Self::webviews`] for a fine grained access control.",
1099
1106
"type": "array",
@@ -1131,42 +1138,21 @@
1131
1138
}
1132
1139
}
1133
1140
},
1134
-
"CapabilityContext": {
1135
-
"description": "Context of the capability.",
1136
-
"oneOf": [
1137
-
{
1138
-
"description": "Capability refers to local URL usage.",
1139
-
"type": "string",
1140
-
"enum": [
1141
-
"local"
1142
-
]
1143
-
},
1144
-
{
1145
-
"description": "Capability refers to remote usage.",
1146
-
"type": "object",
1147
-
"required": [
1148
-
"remote"
1149
-
],
1150
-
"properties": {
1151
-
"remote": {
1152
-
"type": "object",
1153
-
"required": [
1154
-
"urls"
1155
-
],
1156
-
"properties": {
1157
-
"urls": {
1158
-
"description": "Remote domains this capability refers to. Can use glob patterns.",
1159
-
"type": "array",
1160
-
"items": {
1161
-
"type": "string"
1162
-
}
1163
-
}
1164
-
}
1165
-
}
1166
-
},
1167
-
"additionalProperties": false
1141
+
"CapabilityRemote": {
1142
+
"description": "Configuration for remote URLs that are associated with the capability.",
1143
+
"type": "object",
1144
+
"required": [
1145
+
"urls"
1146
+
],
1147
+
"properties": {
1148
+
"urls": {
1149
+
"description": "Remote domains this capability refers to. Can use glob patterns.",
1150
+
"type": "array",
1151
+
"items": {
1152
+
"type": "string"
1153
+
}
1168
1154
}
1169
-
]
1155
+
}
1170
1156
},
1171
1157
"PermissionEntry": {
1172
1158
"description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.",
Copy file name to clipboardExpand all lines: tooling/cli/schema.json
+26-40Lines changed: 26 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -1085,15 +1085,22 @@
1085
1085
"default": "",
1086
1086
"type": "string"
1087
1087
},
1088
-
"context": {
1089
-
"description": "Execution context of the capability.\n\nAt runtime, Tauri filters the IPC command together with the context to determine whether it is allowed or not and its scope.",
1090
-
"default": "local",
1091
-
"allOf": [
1088
+
"remote": {
1089
+
"description": "Configure remote URLs that can use the capability permissions.",
1090
+
"anyOf": [
1092
1091
{
1093
-
"$ref": "#/definitions/CapabilityContext"
1092
+
"$ref": "#/definitions/CapabilityRemote"
1093
+
},
1094
+
{
1095
+
"type": "null"
1094
1096
}
1095
1097
]
1096
1098
},
1099
+
"local": {
1100
+
"description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.",
1101
+
"default": true,
1102
+
"type": "boolean"
1103
+
},
1097
1104
"windows": {
1098
1105
"description": "List of windows that uses this capability. Can be a glob pattern.\n\nOn multiwebview windows, prefer [`Self::webviews`] for a fine grained access control.",
1099
1106
"type": "array",
@@ -1131,42 +1138,21 @@
1131
1138
}
1132
1139
}
1133
1140
},
1134
-
"CapabilityContext": {
1135
-
"description": "Context of the capability.",
1136
-
"oneOf": [
1137
-
{
1138
-
"description": "Capability refers to local URL usage.",
1139
-
"type": "string",
1140
-
"enum": [
1141
-
"local"
1142
-
]
1143
-
},
1144
-
{
1145
-
"description": "Capability refers to remote usage.",
1146
-
"type": "object",
1147
-
"required": [
1148
-
"remote"
1149
-
],
1150
-
"properties": {
1151
-
"remote": {
1152
-
"type": "object",
1153
-
"required": [
1154
-
"urls"
1155
-
],
1156
-
"properties": {
1157
-
"urls": {
1158
-
"description": "Remote domains this capability refers to. Can use glob patterns.",
1159
-
"type": "array",
1160
-
"items": {
1161
-
"type": "string"
1162
-
}
1163
-
}
1164
-
}
1165
-
}
1166
-
},
1167
-
"additionalProperties": false
1141
+
"CapabilityRemote": {
1142
+
"description": "Configuration for remote URLs that are associated with the capability.",
1143
+
"type": "object",
1144
+
"required": [
1145
+
"urls"
1146
+
],
1147
+
"properties": {
1148
+
"urls": {
1149
+
"description": "Remote domains this capability refers to. Can use glob patterns.",
1150
+
"type": "array",
1151
+
"items": {
1152
+
"type": "string"
1153
+
}
1168
1154
}
1169
-
]
1155
+
}
1170
1156
},
1171
1157
"PermissionEntry": {
1172
1158
"description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.",
0 commit comments