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
feat: Auto Generation of ACL Schema File for Documentation (#9903)
* Add auto generated acl schema files for docs
* update CI
---------
Co-authored-by: Lucas Nogueira <[email protected]>
Co-authored-by: Lucas Nogueira <[email protected]>
"description": "A grouping and boundary mechanism developers can use to separate windows or plugins functionality from each other at runtime.\n\nIf a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create trust groups and reduce impact of vulnerabilities in certain plugins or windows. Windows can be added to a capability by exact name or glob patterns like *, admin-* or main-window.",
5
+
"type": "object",
6
+
"required": [
7
+
"identifier",
8
+
"permissions"
9
+
],
10
+
"properties": {
11
+
"identifier": {
12
+
"description": "Identifier of the capability.",
13
+
"type": "string"
14
+
},
15
+
"description": {
16
+
"description": "Description of the capability.",
17
+
"default": "",
18
+
"type": "string"
19
+
},
20
+
"remote": {
21
+
"description": "Configure remote URLs that can use the capability permissions.",
22
+
"anyOf": [
23
+
{
24
+
"$ref": "#/definitions/CapabilityRemote"
25
+
},
26
+
{
27
+
"type": "null"
28
+
}
29
+
]
30
+
},
31
+
"local": {
32
+
"description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.",
33
+
"default": true,
34
+
"type": "boolean"
35
+
},
36
+
"windows": {
37
+
"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.",
38
+
"type": "array",
39
+
"items": {
40
+
"type": "string"
41
+
}
42
+
},
43
+
"webviews": {
44
+
"description": "List of webviews that uses this capability. Can be a glob pattern.\n\nThis is only required when using on multiwebview contexts, by default all child webviews of a window that matches [`Self::windows`] are linked.",
45
+
"type": "array",
46
+
"items": {
47
+
"type": "string"
48
+
}
49
+
},
50
+
"permissions": {
51
+
"description": "List of permissions attached to this capability. Must include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`.",
52
+
"type": "array",
53
+
"items": {
54
+
"$ref": "#/definitions/PermissionEntry"
55
+
}
56
+
},
57
+
"platforms": {
58
+
"description": "Target platforms this capability applies. By default all platforms are affected by this capability.",
59
+
"type": [
60
+
"array",
61
+
"null"
62
+
],
63
+
"items": {
64
+
"$ref": "#/definitions/Target"
65
+
}
66
+
}
67
+
},
68
+
"definitions": {
69
+
"CapabilityRemote": {
70
+
"description": "Configuration for remote URLs that are associated with the capability.",
71
+
"type": "object",
72
+
"required": [
73
+
"urls"
74
+
],
75
+
"properties": {
76
+
"urls": {
77
+
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n# Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
78
+
"type": "array",
79
+
"items": {
80
+
"type": "string"
81
+
}
82
+
}
83
+
}
84
+
},
85
+
"PermissionEntry": {
86
+
"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.",
87
+
"anyOf": [
88
+
{
89
+
"description": "Reference a permission or permission set by identifier.",
90
+
"allOf": [
91
+
{
92
+
"$ref": "#/definitions/Identifier"
93
+
}
94
+
]
95
+
},
96
+
{
97
+
"description": "Reference a permission or permission set by identifier and extends its scope.",
98
+
"type": "object",
99
+
"required": [
100
+
"identifier"
101
+
],
102
+
"properties": {
103
+
"identifier": {
104
+
"description": "Identifier of the permission or permission set.",
105
+
"allOf": [
106
+
{
107
+
"$ref": "#/definitions/Identifier"
108
+
}
109
+
]
110
+
},
111
+
"allow": {
112
+
"description": "Data that defines what is allowed by the scope.",
113
+
"type": [
114
+
"array",
115
+
"null"
116
+
],
117
+
"items": {
118
+
"$ref": "#/definitions/Value"
119
+
}
120
+
},
121
+
"deny": {
122
+
"description": "Data that defines what is denied by the scope.",
123
+
"type": [
124
+
"array",
125
+
"null"
126
+
],
127
+
"items": {
128
+
"$ref": "#/definitions/Value"
129
+
}
130
+
}
131
+
}
132
+
}
133
+
]
134
+
},
135
+
"Identifier": {
136
+
"type": "string"
137
+
},
138
+
"Value": {
139
+
"description": "All supported ACL values.",
140
+
"anyOf": [
141
+
{
142
+
"description": "Represents a null JSON value.",
143
+
"type": "null"
144
+
},
145
+
{
146
+
"description": "Represents a [`bool`].",
147
+
"type": "boolean"
148
+
},
149
+
{
150
+
"description": "Represents a valid ACL [`Number`].",
151
+
"allOf": [
152
+
{
153
+
"$ref": "#/definitions/Number"
154
+
}
155
+
]
156
+
},
157
+
{
158
+
"description": "Represents a [`String`].",
159
+
"type": "string"
160
+
},
161
+
{
162
+
"description": "Represents a list of other [`Value`]s.",
163
+
"type": "array",
164
+
"items": {
165
+
"$ref": "#/definitions/Value"
166
+
}
167
+
},
168
+
{
169
+
"description": "Represents a map of [`String`] keys to [`Value`]s.",
0 commit comments