Fix shouldShowResource when not a cluster admin (#6900)

* Fix shouldShowResource when not a cluster admin

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix only tests that rely on bad formatting of resources

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2023-01-11 09:02:10 -05:00
1 parent 841c6b5720
commit 0ec8cbd7ed
23 files changed
+45 -41

No files matched your search

@@ -13,7 +13,7 @@ const configMapsRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "configmaps",
group: "v1",
group: "",
}),
}),
injectionToken: frontEndRouteInjectionToken,
@@ -14,7 +14,7 @@ const limitRangesRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "limitranges",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const resourceQuotasRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "resourcequotas",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const secretsRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "secrets",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const eventsRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "events",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const namespacesRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "namespaces",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const endpointsRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "endpoints",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const servicesRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "services",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const nodesRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "nodes",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const clusterOverviewRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "nodes",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const persistentVolumeClaimsRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "persistentvolumeclaims",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const persistentVolumesRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "persistentvolumes",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const serviceAccountsRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "serviceaccounts",
group: "v1",
group: "",
}),
}),
@@ -14,7 +14,7 @@ const podsRouteInjectable = getInjectable({
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "pods",
group: "v1",
group: "",
}),
}),