From 6458f928b9aef4cb6004cfbaae190fc21d2bdbd9 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 7 Sep 2021 14:20:49 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20lingering=20capabil?= =?UTF-8?q?ities=20bugs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scopes/scope/auth-methods/index.hbs | 52 ++++++++----------- .../templates/scopes/scope/scopes/index.hbs | 12 +++-- 2 files changed, 29 insertions(+), 35 deletions(-) diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs index a2f2d0860..500beb452 100644 --- a/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs +++ b/ui/admin/app/templates/scopes/scope/auth-methods/index.hbs @@ -12,28 +12,25 @@ - {{#if (can 'create collection' this.scopeModel collection='auth-methods')}} - {{#if @model}} - + - - {{t 'resources.auth-method.types.password'}} - - - {{t 'resources.auth-method.types.oidc'}} - - - {{/if}} + {{t 'resources.auth-method.types.password'}} + + + {{t 'resources.auth-method.types.oidc'}} + + {{/if}} @@ -168,11 +165,13 @@ as |message| > - {{#if (can 'list collection' this.scope collection='auth-methods')}} + {{#if + (can 'list collection' this.scopeModel collection='auth-methods') + }} {{! can list (at least): show default welcome message}} {{t 'resources.auth-method.messages.welcome.description'}} {{else if (can - 'create collection' this.scope collection='auth-methods' + 'create collection' this.scopeModel collection='auth-methods' )}} {{! can create (only): show create-but-not-list welcome message}} {{t @@ -187,15 +186,6 @@ }} {{/if}} - {{#if (can 'create collection' this.scope collection='auth-methods')}} - - - {{t 'titles.new'}} - - {{/if}} diff --git a/ui/admin/app/templates/scopes/scope/scopes/index.hbs b/ui/admin/app/templates/scopes/scope/scopes/index.hbs index 18134a990..4194cdc24 100644 --- a/ui/admin/app/templates/scopes/scope/scopes/index.hbs +++ b/ui/admin/app/templates/scopes/scope/scopes/index.hbs @@ -67,10 +67,14 @@ {{t 'resources.org.description'}} - - - {{t 'titles.new'}} - + {{#if + (can 'create collection' @model.currentScope collection='scopes') + }} + + + {{t 'titles.new'}} + + {{/if}} {{/if}}