Prevent constant-refresh UI bug (#12896)

This commit is contained in:
Chelsea Shaw 2021-11-15 15:45:55 -06:00 committed by GitHub
parent 677e2a1ca5
commit 3d46021d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,9 @@ export default Route.extend(ModelBoundaryRoute, ClusterRoute, {
const currentTokenName = this.auth.get('currentTokenName');
// if no namespace queryParam and user authenticated,
// use user's root namespace to redirect to properly param'd url
if (this.featureFlagService.managedNamespaceRoot && !this.version.hasNamespaces) {
window.alert('Cannot use Cloud Admin Namespace flag with OSS Vault');
}
if (!namespace && currentTokenName && !Ember.testing) {
const storage = getStorage().getItem(currentTokenName);
namespace = storage?.userRootNamespace;