feat: 🎸 accounts capability

This commit is contained in:
dharini committed 2021-09-03 10:22:54 -07:00
1 parent 144c7d13ee
commit 46f33aba17
9 files changed
+208 -22

No files matched your search

@@ -55,12 +55,16 @@
</dropdown.button>
{{/if}}
{{/if}}
<dropdown.link
@route='scopes.scope.auth-methods.auth-method.accounts.new'
@model={{@model}}
>
{{t 'resources.account.actions.create'}}
</dropdown.link>
{{#if (can 'create collection' @model collection='accounts')}}
<dropdown.link
@route='scopes.scope.auth-methods.auth-method.accounts.new'
@model={{@model}}
>
{{t 'resources.account.actions.create'}}
</dropdown.link>
{{/if}}
{{#if (can 'delete model' @model)}}
<dropdown.separator />
<dropdown.button
@@ -2,7 +2,10 @@
<nav.link @route='scopes.scope.auth-methods.auth-method.index'>
{{t 'titles.details'}}
</nav.link>
<nav.link @route='scopes.scope.auth-methods.auth-method.accounts'>
{{t 'resources.account.title_plural'}}
</nav.link>
{{#if (can 'navigate collection' @model collection='accounts')}}
<nav.link @route='scopes.scope.auth-methods.auth-method.accounts'>
{{t 'resources.account.title_plural'}}
</nav.link>
{{/if}}
</Rose::Nav::Tabs>
@@ -112,12 +112,38 @@
as |message|
>
<message.description>
{{t 'resources.account.messages.welcome.description'}}
{{#if (can 'list collection' this.authMethod collection='accounts')}}
{{! can list (at least): show default welcome message}}
{{t 'resources.account.description'}}
{{else if (can
'create collection' this.authMethod collection='accounts'
)}}
{{! can create (only): show create-but-not-list welcome message}}
{{t
'descriptions.create-but-not-list'
resource=(t 'resources.account.title_plural')
}}
{{else}}
{{! can neither list nor create }}
{{t
'descriptions.neither-list-nor-create'
resource=(t 'resources.account.title_plural')
}}
{{/if}}
</message.description>
<message.link @route='scopes.scope.auth-methods.auth-method.accounts.new'>
<Rose::Icon @name='flight-icons/plus-circle-16' />
{{t 'resources.account.actions.create'}}
</message.link>
{{#if (can 'create collection' this.authMethod collection='accounts')}}
<message.link
@route='scopes.scope.auth-methods.auth-method.accounts.new'
>
<Rose::Icon @name='flight-icons/plus-circle-16' />
{{t 'resources.account.actions.create'}}
</message.link>
{{/if}}
</Rose::Message>
</Rose::Layout::Centered>