fix: Terminal log 403 error if user not login
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'
}
Which issue(s) this PR fixes:
Fixes #
Special notes for reviewers:
Does this PR introduced a user-facing change?
NONE