web/satellite: set default NotAfter caveat for object browser access grant
According to FIRE-53 ticket we set default NotAfter caveat for object browser access grant Change-Id: Ib421605f524cc176d9ffbf94fc95c09bd06fd477
This commit is contained in:
parent
cc277806d0
commit
42a0b92404
@ -130,12 +130,16 @@ export default class BucketsView extends Vue {
|
|||||||
const cleanAPIKey: AccessGrant = await this.$store.dispatch(ACCESS_GRANTS_ACTIONS.CREATE, this.FILE_BROWSER_AG_NAME);
|
const cleanAPIKey: AccessGrant = await this.$store.dispatch(ACCESS_GRANTS_ACTIONS.CREATE, this.FILE_BROWSER_AG_NAME);
|
||||||
await this.$store.dispatch(OBJECTS_ACTIONS.SET_API_KEY, cleanAPIKey.secret);
|
await this.$store.dispatch(OBJECTS_ACTIONS.SET_API_KEY, cleanAPIKey.secret);
|
||||||
|
|
||||||
|
const now = new Date();
|
||||||
|
const inThreeDays = new Date(now.setDate(now.getDate() + 3));
|
||||||
|
|
||||||
await this.worker.postMessage({
|
await this.worker.postMessage({
|
||||||
'type': 'SetPermission',
|
'type': 'SetPermission',
|
||||||
'isDownload': true,
|
'isDownload': true,
|
||||||
'isUpload': true,
|
'isUpload': true,
|
||||||
'isList': true,
|
'isList': true,
|
||||||
'isDelete': true,
|
'isDelete': true,
|
||||||
|
'notAfter': inThreeDays.toISOString(),
|
||||||
'buckets': [],
|
'buckets': [],
|
||||||
'apiKey': cleanAPIKey.secret,
|
'apiKey': cleanAPIKey.secret,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user