Files
threshold-ui/ui/admin/app/abilities/session-recording.js
T
Randall Morey 8d883073e1 fix: 🐛 fix mismtach between fe/be feature flag strings (#264)
* fix: 🐛 fix mismtach between fe/be feature flag strings

* chore: 🤖 add development can helper to recompute on flags
2023-05-22 08:49:30 -07:00

23 lines
581 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;
}
}