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

sql: add CREATELOGIN, CREATEDB, and CONTROLJOB system privileges #110220

Merged
merged 4 commits into from
Sep 8, 2023

Conversation

andyyang890
Copy link
Collaborator

Fixes #103237

Release note (sql change): There is now a `CREATELOGIN` system privilege,
which is analogous to the existing `CREATELOGIN` role option, but can
also be inherited by role membership.
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Release note (sql change): There is now a `CREATEDB` system privilege,
which is analogous to the existing `CREATEDB` role option, but can
also be inherited by role membership.
This patch updates the job authorization code to only check the VIEWJOB
privilege if the user does not have CONTROLJOB for ViewAccess.

It also updates the comment to reflect granting access when a user has
VIEWJOB and corrects a format specifier.

Release note: None
Release note (sql change): There is now a `CONTROLJOB` system privilege,
which is analogous to the existing `CONTROLJOB` role option, but can
also be inherited by role membership.
@andyyang890 andyyang890 marked this pull request as ready for review September 7, 2023 21:53
@andyyang890 andyyang890 requested review from a team as code owners September 7, 2023 21:53
@andyyang890 andyyang890 requested review from rhu713, rafiss and jayshrivastava and removed request for a team September 7, 2023 21:53
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is great! nice to see that the earlier refactor paid off to make these changes simpler

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @jayshrivastava and @rhu713)

@andyyang890
Copy link
Collaborator Author

tftr!

bors r=rafiss

@craig
Copy link
Contributor

craig bot commented Sep 8, 2023

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL: some role options [e.g. CREATEROLE] don't get passed down to the members of roles
3 participants