mathesar
mathesar copied to clipboard
Mathesar doesn't support scenario where role has no select on table but on table columns
Description
- Create a table.
- Lets say: "Table 1", with columns "id", "somecolumn", and "anothercolumn".
- Grant select to a different role to specific columns in that table, but on entirely on the table.
grant select(id), SELECT (somecolumn) on "Table 1" to mathesar;
- Query that table from psql. Notice that the query works as expected. The granted columns are returned and the column without privilege throws an error when selected.
dbtest1=> select id, somecolumn from "Table 1"; id | somecolumn ----+------------ 1 | 2 | 3 | 4 | 5 | (5 rows) dbtest1=> select id, somecolumn, anothercolumn from "Table 1"; ERROR: permission denied for table Table 1
- Now, open the table in Mathesar. Notice the following empty page:
-
Expected
- We should be able to view the table in this scenario.