diff --git a/addons/api/mirage/scenarios/default.js b/addons/api/mirage/scenarios/default.js
index ceb61b566..f03170eb4 100644
--- a/addons/api/mirage/scenarios/default.js
+++ b/addons/api/mirage/scenarios/default.js
@@ -51,5 +51,8 @@ export default function (server) {
server.createList('target', 2, { scope }, 'withAssociations');
// Sessions have target data. Create it after targets.
server.createList('session', 4, { scope }, 'withAssociations');
+ // Create IAM resources for project
+ server.createList('group', 3, { scope });
+ server.createList('role', 3, { scope });
});
}
diff --git a/ui/admin/app/components/form/role/add-principals/index.hbs b/ui/admin/app/components/form/role/add-principals/index.hbs
index 04cde2bbb..9fa698c63 100644
--- a/ui/admin/app/components/form/role/add-principals/index.hbs
+++ b/ui/admin/app/components/form/role/add-principals/index.hbs
@@ -44,12 +44,23 @@
{{principal.id}}
- {{t
+
+ {{t
(concat
'resources.role.principal.types.'
principal.constructor.modelName
)
- }}
+ }}
+
+
+
+
diff --git a/ui/admin/app/templates/scopes/scope.hbs b/ui/admin/app/templates/scopes/scope.hbs
index 20ad15e36..81267ca84 100644
--- a/ui/admin/app/templates/scopes/scope.hbs
+++ b/ui/admin/app/templates/scopes/scope.hbs
@@ -107,40 +107,47 @@
{{/if}}
- {{#unless @model.isProject}}
-
+
+ {{! Users are available only for org/global scopes }}
+ {{#unless @model.isProject}}
{{#if (can 'navigate model' @model collection='users')}}
{{t 'resources.user.title_plural'}}
{{/if}}
- {{#if (can 'navigate model' @model collection='groups')}}
-
-
- {{t 'resources.group.title_plural'}}
-
- {{/if}}
- {{#if (can 'navigate model' @model collection='roles')}}
-
-
- {{t 'resources.role.title_plural'}}
-
- {{/if}}
+ {{/unless}}
+
+ {{! Groups and roles are available for all scopes }}
+ {{#if (can 'navigate model' @model collection='groups')}}
+
+
+ {{t 'resources.group.title_plural'}}
+
+ {{/if}}
+ {{#if (can 'navigate model' @model collection='roles')}}
+
+
+ {{t 'resources.role.title_plural'}}
+
+ {{/if}}
+
+ {{! Auth methods are available only for org/global scopes }}
+ {{#unless @model.isProject}}
{{#if (can 'navigate model' @model collection='auth-methods')}}
{{t 'resources.auth-method.title_plural'}}
{{/if}}
-
- {{/unless}}
+ {{/unless}}
+
{{#if @model.isOrg}}
{{#if this.session.data.authenticated.isGlobal}}
diff --git a/ui/admin/app/templates/scopes/scope/roles/index.hbs b/ui/admin/app/templates/scopes/scope/roles/index.hbs
index 19fd914dc..6790efbce 100644
--- a/ui/admin/app/templates/scopes/scope/roles/index.hbs
+++ b/ui/admin/app/templates/scopes/scope/roles/index.hbs
@@ -72,7 +72,7 @@
{{#if (can 'list model' this.scope collection='roles')}}
{{! can list (at least): show default welcome message}}
- {{t 'resources.roles.description'}}
+ {{t 'resources.role.description'}}
{{else if (can 'create model' this.scope collection='roles')}}
{{! can create (only): show create-but-not-list welcome message}}
{{t
diff --git a/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs b/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs
index 6d17d1259..dff671518 100644
--- a/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs
+++ b/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs
@@ -62,9 +62,17 @@
- {{t
+
+ {{t
(concat 'resources.role.principal.types.' principal.type)
- }}
+ }}
+