diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 0a137c8c4..cb5ae2fc4 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -222,6 +222,11 @@ session-recording: storage-bucket: title: Storage Bucket title_plural: Storage Buckets + messages: + none: + title: No storage buckets yet + description: To start using session recording, you need to have an Amazon S3 bucket. + link: Add a new storage bucket titles: new: New Storage Bucket aws: AWS diff --git a/ui/admin/app/templates/scopes/scope/storage-buckets/index.hbs b/ui/admin/app/templates/scopes/scope/storage-buckets/index.hbs index 84973481c..082c294eb 100644 --- a/ui/admin/app/templates/scopes/scope/storage-buckets/index.hbs +++ b/ui/admin/app/templates/scopes/scope/storage-buckets/index.hbs @@ -17,8 +17,9 @@ - {{! TODO: Check can create ability using correct file }} - {{#if (can 'create model' this.scope collection='storage-buckets')}} + {{#if + (can 'create storage-bucket' this.scope collection='storage-buckets') + }} {{#if @model}} {{else}} - {{!TODO: Render new landing page }} + + + + {{#if + (can + 'list storage-bucket' this.scope collection='storage-buckets' + ) + }} + {{t 'resources.storage-bucket.messages.none.description'}} + {{else if (can + 'create storage-bucket' this.scope collection='storage-buckets' + )}} + {{t + 'descriptions.create-but-not-list' + resource=(t 'resources.storage-bucket.title_plural') + }} + {{else}} + {{t + 'descriptions.neither-list-nor-create' + resource=(t 'resources.storage-bucket.title_plural') + }} + {{/if}} + + {{#if + (can + 'create storage-bucket' this.scope collection='storage-buckets' + ) + }} + + {{/if}} + + {{/if}} \ No newline at end of file