INSERT-only API requires SELECT rights #1936
-
Environment
Description of issueIn tutorial 0, granting insert only, instead of insert + select, does not make it possible to insert into api.todos:
I get: Running the following fixes the problem: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I may be wrong about this, but I don't think this is a bug. Basically, in order to create an entry a function is called that must also perform some read operations in the process of replying to the HTTP request. In particular the
So, at least from the code it looks like having read permission is expected. I may be wrong though... so you can wait for a maintainer to answer this more properly. |
Beta Was this translation helpful? Give feedback.
-
@savv v8.0.0 no longer has this issue:
From: https://postgrest.org/en/v8.0/releases/v8.0.0.html#changed In v7.0.1, you can use |
Beta Was this translation helpful? Give feedback.
-
I thought it might have been something like that. Thank you for letting me know; closing. |
Beta Was this translation helpful? Give feedback.
@savv v8.0.0 no longer has this issue:
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.