* 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>
33 lines
857 B
JavaScript
33 lines
857 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import SessionRecordingAbility from 'api/abilities/session-recording';
|
|
import { inject as service } from '@ember/service';
|
|
|
|
export default class OverrideSessionRecordingAbility extends SessionRecordingAbility {
|
|
// =service
|
|
@service features;
|
|
|
|
/**
|
|
* This override ensures that session recordings may be read only if the
|
|
* session-recording feature flag is enabled.
|
|
*/
|
|
get canRead() {
|
|
return this.features.isEnabled('ssh-session-recording')
|
|
? super.canRead
|
|
: false;
|
|
}
|
|
|
|
/**
|
|
* Reapplying policy is allowed only if the feature flag is enabled
|
|
* @type {boolean}
|
|
*/
|
|
get canReapplyStoragePolicy() {
|
|
return this.features.isEnabled('ssh-session-recording')
|
|
? this.hasAuthorizedAction('reapply-storage-policy')
|
|
: false;
|
|
}
|
|
}
|