From 7c4ace270f4be74e08b3c1129fb523dba210c61f Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 26 Oct 2020 11:17:03 -0400 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20expose=20IAM=20resources?= =?UTF-8?q?=20in=20the=20global=20scope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/templates/scopes/scope.hbs | 32 ++++++++++++++++++-------- ui/core/mirage/scenarios/default.js | 4 +++- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/ui/core/app/templates/scopes/scope.hbs b/ui/core/app/templates/scopes/scope.hbs index 908b13f16..75c531af1 100644 --- a/ui/core/app/templates/scopes/scope.hbs +++ b/ui/core/app/templates/scopes/scope.hbs @@ -1,21 +1,33 @@ {{#if this.session.isAuthenticated}} - {{#unless @model.isGlobal}} - - - - {{t "resources.project.title_plural"}} - - + + {{#if @model.isGlobal}} + + + + {{t "resources.org.title_plural"}} + + + {{/if}} + + {{#if @model.isOrg}} + + + + {{t "resources.project.title_plural"}} + + + {{/if}} {{outlet "sidebar"}} - {{/unless}} {{/if}} diff --git a/ui/core/mirage/scenarios/default.js b/ui/core/mirage/scenarios/default.js index e4cd01854..cc821e6dd 100644 --- a/ui/core/mirage/scenarios/default.js +++ b/ui/core/mirage/scenarios/default.js @@ -14,12 +14,14 @@ export default function(server) { }, 'withChildren')[0]; // Auth - server.createList('auth-method', 3, { scope: globalScope }); + server.createList('auth-method', 1, { scope: globalScope }, 'withAccountsAndUsers'); server.createList('auth-method', 3, { scope: orgScope }, 'withAccountsAndUsers'); // Groups and Users + server.createList('group', 1, { scope: globalScope }, 'withMembers'); server.createList('group', 5, { scope: orgScope }, 'withMembers'); // Role + server.createList('role', 1, { scope: globalScope }, 'withPrincipals'); server.createList('role', 5, { scope: orgScope }, 'withPrincipals'); // Other resources