Merge pull request #744 from hashicorp/fix-auth-method-create
fix: 🐛 hide auth method create link when grants missing
This commit is contained in:
2 files changed
+19
-17
No files matched your search
@@ -187,16 +187,12 @@
|
||||
}}
|
||||
{{/if}}
|
||||
</message.description>
|
||||
<message.link
|
||||
@route='scopes.scope.auth-methods.new'
|
||||
@query={{hash type='password'}}
|
||||
>
|
||||
<Rose::Icon @name='flight-icons/plus-circle-16' />
|
||||
{{t 'titles.new'}}
|
||||
</message.link>
|
||||
{{#if (can 'create collection' this.scope collection='auth-methods')}}
|
||||
<message.link @route='scopes.scope.auth-method.new'>
|
||||
<Rose::Icon @name='plus-circle-outline' />
|
||||
<message.link
|
||||
@route='scopes.scope.auth-methods.new'
|
||||
@query={{hash type='password'}}
|
||||
>
|
||||
<Rose::Icon @name='flight-icons/plus-circle-16' />
|
||||
{{t 'titles.new'}}
|
||||
</message.link>
|
||||
{{/if}}
|
||||
|
||||
@@ -26,10 +26,12 @@
|
||||
</page.header>
|
||||
|
||||
<page.actions>
|
||||
{{#if @model.subScopes}}
|
||||
<Rose::LinkButton @route='scopes.scope.new' @style='primary'>
|
||||
{{t 'titles.new'}}
|
||||
</Rose::LinkButton>
|
||||
{{#if (can 'create collection' @model.currentScope collection='scopes')}}
|
||||
{{#if @model.subScopes}}
|
||||
<Rose::LinkButton @route='scopes.scope.new' @style='primary'>
|
||||
{{t 'titles.new'}}
|
||||
</Rose::LinkButton>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</page.actions>
|
||||
|
||||
@@ -82,10 +84,14 @@
|
||||
<message.description>
|
||||
{{t 'resources.project.description'}}
|
||||
</message.description>
|
||||
<message.link @route='scopes.scope.new'>
|
||||
<Rose::Icon @name='flight-icons/plus-circle-16' />
|
||||
{{t 'titles.new'}}
|
||||
</message.link>
|
||||
{{#if
|
||||
(can 'create collection' @model.currentScope collection='scopes')
|
||||
}}
|
||||
<message.link @route='scopes.scope.new'>
|
||||
<Rose::Icon @name='flight-icons/plus-circle-16' />
|
||||
{{t 'titles.new'}}
|
||||
</message.link>
|
||||
{{/if}}
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
{{/if}}
|
||||
|
||||
Reference in new issue
Block a user