Skip to content

fix: Terminal log 403 error if user not login

Calvin Yu请求将github/fork/weili520/opt_k8s_runtime合并到master

Created by: weili520

Signed-off-by: TheYoungManLi cjl@kubesphere.io

What type of PR is this?

/kind bug

What this PR does / why we need it:

If user not login, the terminal will log an error as follows:

{
  code: 403,
  kind: 'Status',
  apiVersion: 'v1',
  metadata: {},
  status: 'Failure',
  message: 'nodes is forbidden: User "system:anonymous" cannot list resource "nodes" in API group "" at the cluster scope',
  reason: 'Forbidden',
  details: { kind: 'nodes' },
  statusText: 'Forbidden'
}

image

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

Does this PR introduced a user-facing change?

NONE

Additional documentation, usage docs, etc.:

合并请求报告

加载中