Can I allow users to fetch some tables only by id?...
# off-topic
j
Can I allow users to fetch some tables only by id? I want to avoid a moment when someone will try to select all records from table. I dont see that option with RTL, is custom backend for that the only way?
g
You can use RLS for select set to false. Then create an rpc function which takes an id and returns a record for that row. The function needs to be set to security definer to skip RLS. There is an example in help the past day or two from same question.
j
Ohh that is so simple, thank you
g
Select only single row by id from table