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
merged 5 commits into from Jun 5, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

address comment

  • Loading branch information...
imtbkcat committed Jun 4, 2019
commit b9aa1137a9f85cf426078fc8ac1ac2fd5882736c
@@ -186,8 +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 {
grants, err = nil, errNonexistingGrant.GenWithStackByArgs()
return
return nil, errNonexistingGrant.GenWithStackByArgs()

This comment has been minimized.

Copy link
@jackysp

jackysp Jun 4, 2019

Member

What will this error look like?

}
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.