Fix loading all namespaces for users with limited cluster access (#2217)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala authored and GitHub committed 2021-02-24 16:10:47 +02:00
1 parent 92dfd80889
commit f18d8618cd
2 files changed
+2 -1

No files matched your search

@@ -120,7 +120,7 @@ export class NamespaceStore extends KubeObjectStore<Namespace> {
protected async loadItems(params: KubeObjectStoreLoadingParams) {
const { allowedNamespaces } = this;
let namespaces = await super.loadItems(params);
let namespaces = (await super.loadItems(params)) || [];
namespaces = namespaces.filter(namespace => allowedNamespaces.includes(namespace.getName()));