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

privileges: add SkipWithGrant check for RBAC methods #10681

merged 5 commits into from Jun 5, 2019
Changes from 1 commit
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

address comment

  • Loading branch information...
imtbkcat committed Jun 4, 2019
commit 1f797f982b11ceb8717f851a406a8dadbd425101
@@ -186,7 +186,7 @@ func (p *UserPrivileges) UserPrivilegesTable() [][]types.Datum {
// ShowGrants implements privilege.Manager ShowGrants interface.
func (p *UserPrivileges) ShowGrants(ctx sessionctx.Context, user *auth.UserIdentity, roles []*auth.RoleIdentity) (grants []string, err error) {
if SkipWithGrant {
return nil, errNonexistingGrant.GenWithStackByArgs()
return nil, errNonexistingGrant.GenWithStackByArgs("root", "%")
mysqlPrivilege := p.Handle.Get()
u := user.Username
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.