Skip to content

Commit

Permalink
Remove auth checks for listing the pods
Browse files Browse the repository at this point in the history
  • Loading branch information
d-gol committed Dec 24, 2022
1 parent 0c017ff commit 3d1460a
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions pkg/new-ui/v1beta1/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,17 +619,6 @@ func (k *KatibUIHandler) FetchTrialLogs(w http.ResponseWriter, r *http.Request)
return
}

user, err = IsAuthorized(consts.ActionTypeList, namespace, corev1.ResourcePods.String(), "", "", corev1.SchemeGroupVersion, k.katibClient.GetClient(), r)
if user == "" && err != nil {
log.Printf("No user provided in kubeflow-userid header.")
http.Error(w, err.Error(), http.StatusUnauthorized)
return
} else if err != nil {
log.Printf("The user: %s is not authorized to list pods in namespace: %s \n", user, namespace)
http.Error(w, err.Error(), http.StatusForbidden)
return
}

trial := &trialsv1beta1.Trial{}
if err := k.katibClient.GetClient().Get(context.TODO(), types.NamespacedName{Name: trialName, Namespace: namespace}, trial); err != nil {
log.Printf("GetLogs failed: %v", err)
Expand Down

0 comments on commit 3d1460a

Please sign in to comment.