Merge pull request #745 from hashicorp/fix-scope-create

fix: 🐛 scope create shows only when permissions granted
This commit is contained in:
Susmitha Girumala authored and GitHub committed 2021-09-06 23:04:24 -04:00
commit 9808e9a9d3
1 file changed
+14 -8
@@ -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}}