-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: update SHOW GRANTS to include grant options #73394
Copy link
Copy link
Closed
Labels
A-sql-privilegesSQL privilege handling and permission checks.SQL privilege handling and permission checks.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Metadata
Metadata
Assignees
Labels
A-sql-privilegesSQL privilege handling and permission checks.SQL privilege handling and permission checks.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Once #67410 is completed, we will need to provide a way for users to see which GRANT options they have.
As the RFC describes (#72512), we will do this by adding a new column to SHOW GRANTS:
For example:
Code to update:
is_grantablecolumn forinformation_schema.table_privilegesand `information_schema.schema_privileges in information_schema.go. The column should be based on the grant option, and the code to populate it should be behind a version gate.is_grantablecolumn (or similar name) toinformation_schema.type_privilegesandcrdb_internal.cluster_database_privileges(also version gated).is_grantablecolumn we'll need to update the logic around the ALL privilege a little. If the user does not have the ALL grant option, but they do have grant options on other privileges, we'll start showing a separate row for each grant option.Epic CRDB-2587