etcdserver: key, rangeEnd in []byte for auth

This commit is contained in:
Gyu-Ho Lee
2016-06-13 14:17:46 -07:00
parent e9d2eb2b54
commit 5d6af0b51f
2 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ func (s *EtcdServer) Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeRe
return nil, err
}
hdr := &pb.RequestHeader{Username: user}
if !s.AuthStore().IsRangePermitted(hdr, string(r.Key), string(r.RangeEnd)) {
if !s.AuthStore().IsRangePermitted(hdr, r.Key, r.RangeEnd) {
return nil, auth.ErrPermissionDenied
}
return s.applyV3.Range(noTxn, r)