From 7cb9ae9f3beafe8c3987928d21a327bef0802fe0 Mon Sep 17 00:00:00 2001 From: lisbet-alvarez <107949262+lisbet-alvarez@users.noreply.github.com> Date: Tue, 23 May 2023 08:47:54 -0700 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20disable=20delete=20a?= =?UTF-8?q?ction=20for=20storage=20bucket=20(#273)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: 💡 disable delete action for storage bucket --- ui/admin/app/abilities/storage-bucket.js | 10 ++++++---- .../app/components/form/storage-bucket/index.hbs | 1 + .../acceptance/storage-buckets/delete-test.js | 14 ++++++++------ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ui/admin/app/abilities/storage-bucket.js b/ui/admin/app/abilities/storage-bucket.js index a63292148..59fcce9e5 100644 --- a/ui/admin/app/abilities/storage-bucket.js +++ b/ui/admin/app/abilities/storage-bucket.js @@ -31,12 +31,14 @@ export default class OverrideStorageBucketAbility extends StorageBucketAbility { } /** - * This override ensures that storage buckets may be deleted only if the + * TODO: Ensure that storage buckets may be deleted only if the * session-recording feature flag is enabled. + * For now a storage bucket cannot be deleted. */ get canDelete() { - return this.features.isEnabled('ssh-session-recording') - ? super.canDelete - : false; + return false; + // return this.features.isEnabled('ssh-session-recording') + // ? super.canDelete + // : false; } } diff --git a/ui/admin/app/components/form/storage-bucket/index.hbs b/ui/admin/app/components/form/storage-bucket/index.hbs index a00ede4ef..447c93edc 100644 --- a/ui/admin/app/components/form/storage-bucket/index.hbs +++ b/ui/admin/app/components/form/storage-bucket/index.hbs @@ -301,6 +301,7 @@ {