Skip to content

Commit

Permalink
refactor(handler): allow visitor to access watch model endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
heiruwu committed Jul 16, 2024
1 parent 427fc45 commit ae38a70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/handler/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func (h *PublicHandler) listNamespaceModelVersions(ctx context.Context, req List
return nil, 0, 0, 0, err
}

if err := authenticateUser(ctx, false); err != nil {
if err := authenticateUser(ctx, true); err != nil {
span.SetStatus(1, err.Error())
return nil, 0, 0, 0, err
}
Expand Down Expand Up @@ -970,7 +970,7 @@ func (h *PublicHandler) watchNamespaceModel(ctx context.Context, req WatchNamesp
return modelpb.State_STATE_ERROR, "", err
}

if err := authenticateUser(ctx, false); err != nil {
if err := authenticateUser(ctx, true); err != nil {
span.SetStatus(1, err.Error())
logger.Info(string(custom_otel.NewLogMessage(
ctx,
Expand Down

0 comments on commit ae38a70

Please sign in to comment.