-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: change privilege check error message (superuser to admin role) #39211
Conversation
82274e1
to
6884517
Compare
@jordanlewis: not sure if you are the right person, but could you review, or point out who could review, this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work.
Feel free to rename the functions if you wish. This would make sense to me.
Reviewed 10 of 10 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained
On the privileged operation failure, the following error was thrown: "pq: only superusers are allowed to <OPERATION>" Which is misleading, becuase superuser is not a concept in CRDB. The error message should be: "pq: only users with the admin role are allowed to <OPERATION>" Resolves: cockroachdb#39099 Release note: None
6884517
to
056afb3
Compare
ok, it builds, but lets see how the tests'll go |
@knz: thanks for your review! I've renamed the functions as well, could you please re-review, and merge if it looks good? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good, thank you very much for your contribution!
bors r+
Reviewed 21 of 21 files at r2.
Reviewable status: complete! 0 of 0 LGTMs obtained
39211: sql: change privilege check error message (superuser to admin role) r=knz a=Gurio This PR resolves #39099 change privilege check error message from "only superusers are allowed to" to "only users with the admin role are allowed to" Open question: should `IsSuperUser` and `RequireSuperUser` method names stay the same? Co-authored-by: Arseni Lapunov <re.stage00101@gmail.com>
Build succeeded |
This PR resolves #39099
change privilege check error message from "only superusers are allowed to" to "only users with the admin role are allowed to"
Open question: should
IsSuperUser
andRequireSuperUser
method names stay the same?