func (p *UserPrivileges) ShowGrants(ctx context.Context, user string) ([]string, error) {
	// If user is current user
	if user == p.User {
		return p.privs.ShowGrants(), nil
	}
	userp := &UserPrivileges{User: user}
	err := userp.loadPrivileges(ctx)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return userp.privs.ShowGrants(), nil
}
// ShowGrants implements privilege.Checker ShowGrants interface.
ShowGrants implements privilege.Checker ShowGrants interface.
// ShowGrants implements privilege . Checker ShowGrants interface .
func (p *UserPrivileges) ShowGrants(ctx context.Context, user string) ([]string, error) {
	if user == p.User {
		return p.privs.ShowGrants(), nil
	}
	userp := &UserPrivileges{User: user}
	err := userp.loadPrivileges(ctx)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return userp.privs.ShowGrants(), nil
}
func ( p * UserPrivileges ) ShowGrants ( ctx context . Context , user string ) ( [ ] string , error ) { if user == p . User { return p . privs . ShowGrants ( ) , nil } userp := & UserPrivileges { User : user } err := userp . loadPrivileges ( ctx ) if err != nil { return nil , errors . Trace ( err ) } return userp . privs . ShowGrants ( ) , nil }
ShowGrants implements privilege.Checker ShowGrants interface.
ShowGrants implements privilege . Checker ShowGrants interface .
// If user is current user