Skip to content

Commit ef4f43d

Browse files
backport of UI: remove stored token if cluster needs init (#26988)
Co-authored-by: Chelsea Shaw <[email protected]>
1 parent 96ccc46 commit ef4f43d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

changelog/26985.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
ui: Prevent perpetual loading screen when Vault needs initialization
3+
```

ui/app/routes/vault/cluster.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ export default Route.extend(ModelBoundaryRoute, ClusterRoute, {
121121
afterModel(model, transition) {
122122
this._super(...arguments);
123123
this.currentCluster.setCluster(model);
124+
if (model.needsInit && this.auth.currentToken) {
125+
// clear token to prevent infinite load state
126+
this.auth.deleteCurrentToken();
127+
}
124128

125129
// Check that namespaces is enabled and if not,
126130
// clear the namespace by transition to this route w/o it

0 commit comments

Comments
 (0)