* refactor: 💡 add global settings link ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12257 * fix: 🐛 route ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12257 * fix: 🐛 comment ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12257 * feat: 🎸 add reapply sp to session recording page * fix: 🐛 normalize * feat: 🎸 upates * fix: 🐛 logs * fix: 🐛 comment * test: 💍 add tests * fix: 🐛 normalizer, style * fix: 🐛 normalize * fix: 🐛 normalizw * fix: 🐛 normalize * test: 💍 add tests for serializer n normalizer * fix: 🐛 name * fix: 🐛 do not delete, send null * fix: 🐛 return --------- Co-authored-by: Lisbet Alvarez <lisbet.alvarez@hashicorp.com>
35 lines
725 B
JavaScript
35 lines
725 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import ModelAbility from './model';
|
|
|
|
/**
|
|
* Provides abilities for session recordings.
|
|
*/
|
|
export default class SessionRecordingAbility extends ModelAbility {
|
|
// =services
|
|
|
|
// =permissions
|
|
|
|
/**
|
|
* Only "known" session recording types may be read.
|
|
* @type {boolean}
|
|
*/
|
|
get canRead() {
|
|
return !this.model.isUnknown && super.canRead;
|
|
}
|
|
|
|
get canDownload() {
|
|
return this.hasAuthorizedAction('download');
|
|
}
|
|
|
|
/* Permission that checks whether a policy can be reapplied to a session recording
|
|
* @type {boolean}
|
|
*/
|
|
get canReapplyStoragePolicy() {
|
|
return this.hasAuthorizedAction('reapply-storage-policy');
|
|
}
|
|
}
|