mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
Fix server.GetIndexes userInfo logic
userInfo at the relevant line can be nil here. We check later if the userInfo != nil (and assure it passes authn/authz) or if userInfo == nil then we return all the indexes we can find.
This commit is contained in:
parent
0f5a56c958
commit
407d52baa0
1 changed files with 1 additions and 4 deletions
|
|
@ -463,10 +463,7 @@ func (h *GRPCHandler) GetIndex(ctx context.Context, req *pb.GetIndexRequest) (*p
|
|||
|
||||
// GetIndexes returns a list of all Indexes
|
||||
func (h *GRPCHandler) GetIndexes(ctx context.Context, req *pb.GetIndexesRequest) (*pb.GetIndexesResponse, error) {
|
||||
userInfo, ok := authn.GetUserInfo(ctx)
|
||||
if !ok {
|
||||
return nil, status.Error(codes.InvalidArgument, "malformed auth header")
|
||||
}
|
||||
userInfo, _ := authn.GetUserInfo(ctx) // nil is a valid userInfo here
|
||||
schema, err := h.api.Schema(ctx, false)
|
||||
if err != nil {
|
||||
return nil, errToStatusError(err)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue