instead of select * inspect schema to get selectable columns

This commit is contained in:
2026-08-16 14:41:13 +02:00
parent 4a5d626112
commit ce7ea53a57
7 changed files with 132 additions and 48 deletions
+3 -4
View File
@@ -720,11 +720,10 @@ spec withConfig = withConfig baseCfg $ do
, matchHeaders = []
}
it "fails inserting if select is not specified" $
it "succeeds inserting if select is not specified, returning only the accessible columns" $
request methodPost "/limited_article_stars" [("Prefer", "return=representation")]
[json| {"article_id": 3, "user_id": 1} |] `shouldRespondWith`
[json|{"hint":null,"details":null,"code":"42501","message":"permission denied for view limited_article_stars"}|]
{ matchStatus = 401
[json| {"article_id": 3, "user_id": 1} |] `shouldRespondWith` [json|[{"article_id":3,"user_id":1}]|]
{ matchStatus = 201
, matchHeaders = []
}