Chore/update model names (#125)

* chore: 🤖 Rename recording to session-recording

* chore: 🤖 Update names for connection models

* chore: 🤖 Update channel models to new name

* chore: 🤖 Update remaining models after merge conflict
This commit is contained in:
Zhihe Li authored and GitHub committed 2023-03-16 13:49:04 -04:00
1 parent 24f50b3e2d
commit d08ce29e5a
46 files changed
+442 -372

No files matched your search

@@ -0,0 +1,34 @@
/**
* 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 && this.hasAuthorizedAction('read');
}
get canList() {
return (
this.hasAuthorizedCollectionAction('list') &&
(this.model.isGlobal || this.model.isOrg)
);
}
get canDownloadAsciiCast() {
return this.model.isSSH && this.hasAuthorizedAction('download');
}
}