instead of select * inspect schema to get selectable columns
This commit is contained in:
@@ -36,6 +36,19 @@ spec actualPgVersion withConfig = withConfig baseCfg $ do
|
||||
, matchHeaders = ["Content-Length" <:> "120"]
|
||||
}
|
||||
|
||||
describe "Column-level privileges" $ do
|
||||
it "selects only the accessible columns when no select is specified" $
|
||||
get "/app_users?id=eq.1"
|
||||
`shouldRespondWith`
|
||||
[json| [{"id":1,"email":"test@123.com"}] |]
|
||||
{ matchStatus = 200 }
|
||||
|
||||
it "can still select the accessible columns explicitly" $
|
||||
get "/app_users?id=eq.1&select=id,email"
|
||||
`shouldRespondWith`
|
||||
[json| [{"id":1,"email":"test@123.com"}] |]
|
||||
{ matchStatus = 200 }
|
||||
|
||||
describe "Filtering response" $ do
|
||||
it "matches with equality" $
|
||||
get "/items?id=eq.5"
|
||||
|
||||
Reference in New Issue
Block a user