mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-31 18:48:08 +00:00
UI: show banner when batch token expired (#26396)
* allow token expiry for batch token * add changelog
This commit is contained in:
3
changelog/26396.txt
Normal file
3
changelog/26396.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
```release-note:improvement
|
||||||
|
ui: show banner instead of permission denied error when batch token is expired
|
||||||
|
```
|
||||||
@@ -298,6 +298,11 @@ export default Service.extend({
|
|||||||
|
|
||||||
if (resp.renewable) {
|
if (resp.renewable) {
|
||||||
Object.assign(data, this.calculateExpiration(resp));
|
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) {
|
if (!data.displayName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user