Skip to content

Commit 1dcd10a

Browse files
authored
Merge pull request silvermine#21 from jjhafer/jhafer/fix_missing_command_permissions
fix: set permissions for recently added commands
2 parents a66d621 + a9f5f9e commit 1dcd10a

7 files changed

Lines changed: 164 additions & 2 deletions

File tree

build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ fn main() {
33
"load",
44
"execute",
55
"execute_transaction",
6+
"execute_interruptible_transaction",
7+
"transaction_continue",
8+
"transaction_read",
69
"fetch_all",
710
"fetch_one",
811
"close",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-execute-interruptible-transaction"
7+
description = "Enables the execute_interruptible_transaction command without any pre-configured scope."
8+
commands.allow = ["execute_interruptible_transaction"]
9+
10+
[[permission]]
11+
identifier = "deny-execute-interruptible-transaction"
12+
description = "Denies the execute_interruptible_transaction command without any pre-configured scope."
13+
commands.deny = ["execute_interruptible_transaction"]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-transaction-continue"
7+
description = "Enables the transaction_continue command without any pre-configured scope."
8+
commands.allow = ["transaction_continue"]
9+
10+
[[permission]]
11+
identifier = "deny-transaction-continue"
12+
description = "Denies the transaction_continue command without any pre-configured scope."
13+
commands.deny = ["transaction_continue"]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-transaction-read"
7+
description = "Enables the transaction_read command without any pre-configured scope."
8+
commands.allow = ["transaction_read"]
9+
10+
[[permission]]
11+
identifier = "deny-transaction-read"
12+
description = "Denies the transaction_read command without any pre-configured scope."
13+
commands.deny = ["transaction_read"]

permissions/autogenerated/reference.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Default permissions for the sqlite plugin - allows all database operations
77
- `allow-load`
88
- `allow-execute`
99
- `allow-execute-transaction`
10+
- `allow-execute-interruptible-transaction`
11+
- `allow-transaction-continue`
12+
- `allow-transaction-read`
1013
- `allow-fetch-all`
1114
- `allow-fetch-one`
1215
- `allow-close`
@@ -103,6 +106,32 @@ Denies the execute command without any pre-configured scope.
103106
<tr>
104107
<td>
105108

109+
`sqlite:allow-execute-interruptible-transaction`
110+
111+
</td>
112+
<td>
113+
114+
Enables the execute_interruptible_transaction command without any pre-configured scope.
115+
116+
</td>
117+
</tr>
118+
119+
<tr>
120+
<td>
121+
122+
`sqlite:deny-execute-interruptible-transaction`
123+
124+
</td>
125+
<td>
126+
127+
Denies the execute_interruptible_transaction command without any pre-configured scope.
128+
129+
</td>
130+
</tr>
131+
132+
<tr>
133+
<td>
134+
106135
`sqlite:allow-execute-transaction`
107136

108137
</td>
@@ -253,6 +282,58 @@ Enables the remove command without any pre-configured scope.
253282

254283
Denies the remove command without any pre-configured scope.
255284

285+
</td>
286+
</tr>
287+
288+
<tr>
289+
<td>
290+
291+
`sqlite:allow-transaction-continue`
292+
293+
</td>
294+
<td>
295+
296+
Enables the transaction_continue command without any pre-configured scope.
297+
298+
</td>
299+
</tr>
300+
301+
<tr>
302+
<td>
303+
304+
`sqlite:deny-transaction-continue`
305+
306+
</td>
307+
<td>
308+
309+
Denies the transaction_continue command without any pre-configured scope.
310+
311+
</td>
312+
</tr>
313+
314+
<tr>
315+
<td>
316+
317+
`sqlite:allow-transaction-read`
318+
319+
</td>
320+
<td>
321+
322+
Enables the transaction_read command without any pre-configured scope.
323+
324+
</td>
325+
</tr>
326+
327+
<tr>
328+
<td>
329+
330+
`sqlite:deny-transaction-read`
331+
332+
</td>
333+
<td>
334+
335+
Denies the transaction_read command without any pre-configured scope.
336+
256337
</td>
257338
</tr>
258339
</table>

permissions/default.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ permissions = [
1010
"allow-load",
1111
"allow-execute",
1212
"allow-execute-transaction",
13+
"allow-execute-interruptible-transaction",
14+
"allow-transaction-continue",
15+
"allow-transaction-read",
1316
"allow-fetch-all",
1417
"allow-fetch-one",
1518
"allow-close",

permissions/schemas/schema.json

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,18 @@
330330
"const": "deny-execute",
331331
"markdownDescription": "Denies the execute command without any pre-configured scope."
332332
},
333+
{
334+
"description": "Enables the execute_interruptible_transaction command without any pre-configured scope.",
335+
"type": "string",
336+
"const": "allow-execute-interruptible-transaction",
337+
"markdownDescription": "Enables the execute_interruptible_transaction command without any pre-configured scope."
338+
},
339+
{
340+
"description": "Denies the execute_interruptible_transaction command without any pre-configured scope.",
341+
"type": "string",
342+
"const": "deny-execute-interruptible-transaction",
343+
"markdownDescription": "Denies the execute_interruptible_transaction command without any pre-configured scope."
344+
},
333345
{
334346
"description": "Enables the execute_transaction command without any pre-configured scope.",
335347
"type": "string",
@@ -403,10 +415,34 @@
403415
"markdownDescription": "Denies the remove command without any pre-configured scope."
404416
},
405417
{
406-
"description": "Default permissions for the sqlite plugin - allows all database operations\n#### This default permission set includes:\n\n- `allow-load`\n- `allow-execute`\n- `allow-execute-transaction`\n- `allow-fetch-all`\n- `allow-fetch-one`\n- `allow-close`\n- `allow-close-all`\n- `allow-remove`",
418+
"description": "Enables the transaction_continue command without any pre-configured scope.",
419+
"type": "string",
420+
"const": "allow-transaction-continue",
421+
"markdownDescription": "Enables the transaction_continue command without any pre-configured scope."
422+
},
423+
{
424+
"description": "Denies the transaction_continue command without any pre-configured scope.",
425+
"type": "string",
426+
"const": "deny-transaction-continue",
427+
"markdownDescription": "Denies the transaction_continue command without any pre-configured scope."
428+
},
429+
{
430+
"description": "Enables the transaction_read command without any pre-configured scope.",
431+
"type": "string",
432+
"const": "allow-transaction-read",
433+
"markdownDescription": "Enables the transaction_read command without any pre-configured scope."
434+
},
435+
{
436+
"description": "Denies the transaction_read command without any pre-configured scope.",
437+
"type": "string",
438+
"const": "deny-transaction-read",
439+
"markdownDescription": "Denies the transaction_read command without any pre-configured scope."
440+
},
441+
{
442+
"description": "Default permissions for the sqlite plugin - allows all database operations\n#### This default permission set includes:\n\n- `allow-load`\n- `allow-execute`\n- `allow-execute-transaction`\n- `allow-execute-interruptible-transaction`\n- `allow-transaction-continue`\n- `allow-transaction-read`\n- `allow-fetch-all`\n- `allow-fetch-one`\n- `allow-close`\n- `allow-close-all`\n- `allow-remove`",
407443
"type": "string",
408444
"const": "default",
409-
"markdownDescription": "Default permissions for the sqlite plugin - allows all database operations\n#### This default permission set includes:\n\n- `allow-load`\n- `allow-execute`\n- `allow-execute-transaction`\n- `allow-fetch-all`\n- `allow-fetch-one`\n- `allow-close`\n- `allow-close-all`\n- `allow-remove`"
445+
"markdownDescription": "Default permissions for the sqlite plugin - allows all database operations\n#### This default permission set includes:\n\n- `allow-load`\n- `allow-execute`\n- `allow-execute-transaction`\n- `allow-execute-interruptible-transaction`\n- `allow-transaction-continue`\n- `allow-transaction-read`\n- `allow-fetch-all`\n- `allow-fetch-one`\n- `allow-close`\n- `allow-close-all`\n- `allow-remove`"
410446
}
411447
]
412448
}

0 commit comments

Comments
 (0)