feat: 🎸 Add capabilities to managed groups
Add capabilities to managed groups
This commit is contained in:
1 parent
7c762c1050
commit
8a11a76b49
7 files changed
+78
-21
No files matched your search
@@ -68,14 +68,15 @@
|
||||
{{/if}}
|
||||
|
||||
{{#if (feature-flag 'managed-groups')}}
|
||||
{{! TODO: Add capabilities }}
|
||||
{{#if @model.isOIDC}}
|
||||
<dropdown.link
|
||||
@route='scopes.scope.auth-methods.auth-method.managed-groups.new'
|
||||
@model={{@model}}
|
||||
>
|
||||
{{t 'resources.managed-group.actions.create'}}
|
||||
</dropdown.link>
|
||||
{{#if (can 'create collection' @model collection='managed-groups')}}
|
||||
{{#if @model.isOIDC}}
|
||||
<dropdown.link
|
||||
@route='scopes.scope.auth-methods.auth-method.managed-groups.new'
|
||||
@model={{@model}}
|
||||
>
|
||||
{{t 'resources.managed-group.actions.create'}}
|
||||
</dropdown.link>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
{{/if}}
|
||||
|
||||
{{#if (feature-flag 'managed-groups')}}
|
||||
{{#if @model.isOIDC}}
|
||||
<nav.link @route='scopes.scope.auth-methods.auth-method.managed-groups'>
|
||||
{{t 'resources.managed-group.title_plural'}}
|
||||
</nav.link>
|
||||
{{#if (can 'navigate collection' @model collection='managed-groups')}}
|
||||
{{#if @model.isOIDC}}
|
||||
<nav.link @route='scopes.scope.auth-methods.auth-method.managed-groups'>
|
||||
{{t 'resources.managed-group.title_plural'}}
|
||||
</nav.link>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</Rose::Nav::Tabs>
|
||||
@@ -41,4 +41,46 @@
|
||||
{{/each}}
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
{{else}}
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message
|
||||
@title={{t 'resources.managed-group.messages.welcome.title'}}
|
||||
as |message|
|
||||
>
|
||||
<message.description>
|
||||
|
||||
{{#if
|
||||
(can 'list collection' this.authMethod collection='managed-groups')
|
||||
}}
|
||||
{{! Can list (at least): show default welcome message }}
|
||||
{{t 'resources.managed-group.description'}}
|
||||
{{else if (can
|
||||
'create collection' this.authMethod collection='managed-groups'
|
||||
)}}
|
||||
{{! Can create only: show create but not list welcome message }}
|
||||
{{t
|
||||
'descriptions.create-but-not-list'
|
||||
resource=(t 'resources.managed-group.title_plural')
|
||||
}}
|
||||
{{else}}
|
||||
{{! Can neither list nor create }}
|
||||
{{t
|
||||
'descriptions.neither-list-nor-create'
|
||||
resource=(t 'resources.managed-group.title_plural')
|
||||
}}
|
||||
{{/if}}
|
||||
</message.description>
|
||||
|
||||
{{#if
|
||||
(can 'create collection' this.authMethod collection='managed-groups')
|
||||
}}
|
||||
<message.link
|
||||
@route='scopes.scope.auth-methods.auth-method.managed-groups.new'
|
||||
>
|
||||
<Rose::Icon @name='flight-icons/svg/plus-circle-16' />
|
||||
{{t 'resources.managed-group.actions.create'}}
|
||||
</message.link>
|
||||
{{/if}}
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
{{/if}}
|
||||
Reference in new issue
Block a user