mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Require update-row to use insert replace, closes #2279
This commit is contained in:
parent
3856a8cb24
commit
b36a2d8f4b
3 changed files with 15 additions and 2 deletions
|
|
@ -221,6 +221,14 @@ async def test_insert_rows(ds_write, return_rows):
|
|||
400,
|
||||
['Cannot use "ignore" and "replace" at the same time'],
|
||||
),
|
||||
(
|
||||
# Replace is not allowed if you don't have update-row
|
||||
"/data/docs/-/insert",
|
||||
{"rows": [{"title": "Test"}], "replace": True},
|
||||
"insert-but-not-update",
|
||||
403,
|
||||
['Permission denied: need update-row to use "replace"'],
|
||||
),
|
||||
(
|
||||
"/data/docs/-/insert",
|
||||
{"rows": [{"title": "Test"}], "invalid_param": True},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue