1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

should show resource if missing allowedResources data (#7274)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2023-03-03 13:48:26 +02:00 committed by GitHub
parent cfce7ea67b
commit 8b93a52930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -699,6 +699,11 @@ export class Cluster implements ClusterModel {
}
shouldShowResource(resource: KubeApiResourceDescriptor): boolean {
if (this.allowedResources.size === 0) {
// better to show than hide everything
return true;
}
return this.allowedResources.has(formatKubeApiResource(resource));
}