2023-03-15 15:45:51 -04:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import ModelAbility from './model';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Provides abilities for session recordings.
|
|
|
|
|
*/
|
2023-03-16 13:49:04 -04:00
|
|
|
export default class SessionRecordingAbility extends ModelAbility {
|
2023-03-15 15:45:51 -04:00
|
|
|
// =services
|
|
|
|
|
|
|
|
|
|
// =permissions
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Only "known" session recording types may be read.
|
|
|
|
|
* @type {boolean}
|
|
|
|
|
*/
|
|
|
|
|
get canRead() {
|
2023-05-17 12:24:31 -07:00
|
|
|
return !this.model.isUnknown && super.canRead;
|
2023-03-15 15:45:51 -04:00
|
|
|
}
|
|
|
|
|
|
2023-03-31 17:19:46 -04:00
|
|
|
get canDownload() {
|
2023-04-03 11:56:05 -04:00
|
|
|
return this.hasAuthorizedAction('download');
|
2023-03-15 15:45:51 -04:00
|
|
|
}
|
|
|
|
|
}
|