datasette / datasette-write-ui

A Datasette plugin that adds UI elements to edit, insert, or delete rows in SQLite tables
Apache License 2.0
16 stars 3 forks source link

Error messages are not shown - fails invisibly #28

Open simonw opened 7 months ago

simonw commented 7 months ago

Spotted while testing out https://github.com/datasette/datasette-sqlite-authorizer

permission-bug

When the server returned an error the update UI didn't reflect that error.

Steps to reproduce:

datasette --version # Should be 1.0a12
datasette install datsaette-write-ui
datasette install datasette-sqlite-authorizer
wget https://datasette.io/content.db
datasette content.db --root --secret 1 \
  -s plugins.datasette-sqlite-authorizer.read_only_tables '[{"table": "news"}]'

Then try to edit an item in the news table.

simonw commented 7 months ago

Not a big deal, because when we use datasette-sqlite-authorizer we can pair it up with a permission check that denies insert-row and update-row.

simonw commented 7 months ago

Delete row has the same problem - it fails silently.