Too easy to grant access to table without schema #4009
Labels
needs: frontend approval
The frontend team might not agree on whether this makes sense for the codebase
needs: requirements
The problem is clear and worth solving, but we're not yet sure of the best solution
type: bug
Something isn't working
work: frontend
Related to frontend code in the mathesar_ui directory
Milestone
Description
It's easy to grant
SELECT
on a table to another user's role, while neglecting to grantUSAGE
on that table's schema. This results in a confusing and aberrant situation for the user being granted theSELECT
privilege.Expected behavior
When granting
SELECT
on a table to a user's role which doesn't haveUSAGE
on the table's schema, Mathesar should either:SELECT
on that table, and show a warning or error of some sort, (my preference), orSELECT
on the table as requested and automatically grantUSAGE
on the table's schema, orSELECT
on the table as requested and show a warning or error about theUSAGE
issue.To Reproduce
As an admin user,
public
SELECT
(called "Read" in the dropdown) to that user.USAGE
problem.Additional context
Sort of related to #4008 , in that solving this bug would make that one less likely to be noticed.
The text was updated successfully, but these errors were encountered: