From 07429878740930ca4eb532cb2f28418a8004d403 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Sun, 5 Sep 2021 10:08:41 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20scope=20create=20shows=20?= =?UTF-8?q?only=20when=20permissions=20granted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/scopes/scope/scopes/index.hbs | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ui/admin/app/templates/scopes/scope/scopes/index.hbs b/ui/admin/app/templates/scopes/scope/scopes/index.hbs index 19a4168d5..18134a990 100644 --- a/ui/admin/app/templates/scopes/scope/scopes/index.hbs +++ b/ui/admin/app/templates/scopes/scope/scopes/index.hbs @@ -26,10 +26,12 @@ - {{#if @model.subScopes}} - - {{t 'titles.new'}} - + {{#if (can 'create collection' @model.currentScope collection='scopes')}} + {{#if @model.subScopes}} + + {{t 'titles.new'}} + + {{/if}} {{/if}} @@ -82,10 +84,14 @@ {{t 'resources.project.description'}} - - - {{t 'titles.new'}} - + {{#if + (can 'create collection' @model.currentScope collection='scopes') + }} + + + {{t 'titles.new'}} + + {{/if}} {{/if}}