UI: show banner when batch token expired (#26396)

* allow token expiry for batch token

* add changelog
This commit is contained in:
Chelsea Shaw
2024-04-15 16:04:10 -05:00
committed by GitHub
parent d52db741f5
commit 51ee69d02c
2 changed files with 8 additions and 0 deletions

3
changelog/26396.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:improvement
ui: show banner instead of permission denied error when batch token is expired
```

View File

@@ -298,6 +298,11 @@ export default Service.extend({
if (resp.renewable) {
Object.assign(data, this.calculateExpiration(resp));
} else if (resp.type === 'batch') {
// if it's a batch token, it's not renewable but has an expire time
// so manually set tokenExpirationEpoch and allow expiration
data.tokenExpirationEpoch = new Date(resp.expire_time).getTime();
this.set('allowExpiration', true);
}
if (!data.displayName) {