Skip to content

INSERT-only API requires SELECT rights #1936

Answered by steve-chavez
savv asked this question in Q&A
Discussion options

You must be logged in to vote

@savv v8.0.0 no longer has this issue:

POST requests for insertions no longer include a Location header in the response by default and behave the same way as having a Prefer: return=minimal header in the request. This prevents permissions errors when having a write-only table.

From: https://postgrest.org/en/v8.0/releases/v8.0.0.html#changed

In v7.0.1, you can use Prefer: return=minimal to avoid this error.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by wolfgangwalther
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1934 on September 06, 2021 12:57.