code: func (p *UserPrivileges) ShowGrants(ctx sessionctx.Context, user *auth.UserIdentity, roles []*auth.RoleIdentity) (grants []string, err error) {
  	mysqlPrivilege := p.Handle.Get()
  	u := user.Username
  	h := user.Hostname
  	if len(user.AuthUsername) > 0 && len(user.AuthHostname) > 0 {
  		u = user.AuthUsername
  		h = user.AuthHostname
  	}
  	grants = mysqlPrivilege.showGrants(u, h, roles)
  	if len(grants) == 0 {
  		err = errNonexistingGrant.GenWithStackByArgs(u, h)
  	}
  
  	return
  }
docs: // ShowGrants implements privilege.Manager ShowGrants interface.