Skip to content

Commit e87dc6f

Browse files
committed
terminal: use username if uid is not present
1 parent fd332d1 commit e87dc6f

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

pkg/terminal/proxy.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,7 @@ func (p *Proxy) HandleProxy(user *auth.User, w http.ResponseWriter, r *http.Requ
125125

126126
userId = string(userInfo.Status.UserInfo.UID) // TODO: are we cool rewriting this here?
127127
if userId == "" {
128-
// uid is missing. it must be kube:admin
129-
if userInfo.Status.UserInfo.Username != "kube:admin" {
130-
http.Error(w, "User must have UID to proceed authorization", http.StatusInternalServerError)
131-
return
132-
}
128+
userId = userInfo.Status.UserInfo.Username
133129
}
134130
}
135131

0 commit comments

Comments
 (0)