Allow PATCH/DELETE w/o Prefer when no SELECT privs
PATCH/DELETE can now be done without adding Prefer return=minimal when the user doesn't have SELECT privileges. * Also fix PATCH wrong HTTP status code
This commit is contained in:
committed by
Steve Chávez
parent
337f821e00
commit
ed2bfc09a6
Vendored
+4
@@ -123,6 +123,10 @@ GRANT SELECT (article_id, user_id) ON TABLE limited_article_stars TO postgrest_t
|
||||
GRANT INSERT (article_id, user_id) ON TABLE limited_article_stars TO postgrest_test_anonymous;
|
||||
GRANT UPDATE (article_id, user_id) ON TABLE limited_article_stars TO postgrest_test_anonymous;
|
||||
|
||||
GRANT SELECT(id, email) ON TABLE app_users TO postgrest_test_anonymous;
|
||||
GRANT INSERT, UPDATE ON TABLE app_users TO postgrest_test_anonymous;
|
||||
GRANT DELETE ON TABLE app_users TO postgrest_test_anonymous;
|
||||
|
||||
REVOKE EXECUTE ON FUNCTION privileged_hello(text) FROM PUBLIC; -- All functions are available to every role(PUBLIC) by default
|
||||
GRANT EXECUTE ON FUNCTION privileged_hello(text) TO postgrest_test_author;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user