Skip to content

Commit

Permalink
UI: remove stored token if cluster needs init (#26985)
Browse files Browse the repository at this point in the history
  • Loading branch information
hashishaw authored May 13, 2024
1 parent c6af47f commit 1fa8b1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog/26985.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: Prevent perpetual loading screen when Vault needs initialization
```
4 changes: 4 additions & 0 deletions ui/app/routes/vault/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ export default Route.extend(ModelBoundaryRoute, ClusterRoute, {
afterModel(model, transition) {
this._super(...arguments);
this.currentCluster.setCluster(model);
if (model.needsInit && this.auth.currentToken) {
// clear token to prevent infinite load state
this.auth.deleteCurrentToken();
}

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

0 comments on commit 1fa8b1f

Please sign in to comment.