Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mathesar doesn't support scenario where role has no select on table but on table columns #3914

Open
pavish opened this issue Oct 2, 2024 · 0 comments
Labels
type: bug Something isn't working

Comments

@pavish
Copy link
Member

pavish commented Oct 2, 2024

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:
  • Screenshot 2024-10-02 at 6 25 35 PM

Expected

  • We should be able to view the table in this scenario.
@pavish pavish added the type: bug Something isn't working label Oct 2, 2024
@pavish pavish added this to the v0.2.0-testing.1 milestone Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants