Skip to content

Commit b425271

Browse files
fix: override clusterRbac with default direct behaviour for super admin (#5449)
1 parent bc91c10 commit b425271

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/k8s/application/k8sApplicationRestHandler.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,9 @@ func (handler *K8sApplicationRestHandlerImpl) GetResourceList(w http.ResponseWri
970970
}
971971
clusterRbacFunc := handler.verifyRbacForCluster
972972
if isSuperAdmin {
973-
clusterRbacFunc = nil
973+
clusterRbacFunc = func(token, clusterName string, request k8s.ResourceRequestBean, casbinAction string) bool {
974+
return true
975+
}
974976
}
975977
response, err := handler.k8sApplicationService.GetResourceList(r.Context(), token, &request, clusterRbacFunc)
976978
if err != nil {

0 commit comments

Comments
 (0)