Skip to content

Commit

Permalink
Quota: Fallback to IP when failed to auth (#2283)
Browse files Browse the repository at this point in the history
  • Loading branch information
luluz66 authored Jul 16, 2022
1 parent 908292e commit ca04893
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion server/util/quota/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//server/environment",
"//server/interfaces",
"//server/util/status",
"@org_golang_google_grpc//metadata",
],
Expand Down
3 changes: 1 addition & 2 deletions server/util/quota/quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"strings"

"github.com/buildbuddy-io/buildbuddy/server/environment"
"github.com/buildbuddy-io/buildbuddy/server/interfaces"
"github.com/buildbuddy-io/buildbuddy/server/util/status"
"google.golang.org/grpc/metadata"
)
Expand All @@ -14,7 +13,7 @@ func getGroupID(ctx context.Context, env environment.Env) string {
if a := env.GetAuthenticator(); a != nil {
user, err := a.AuthenticatedUser(ctx)
if err != nil {
return interfaces.AuthAnonymousUser
return ""
}
return user.GetGroupID()
}
Expand Down

0 comments on commit ca04893

Please sign in to comment.