From c1e1b42672bc99bc0eba7960f3e35256ab71971e Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 19 Jul 2022 15:18:30 -0700 Subject: [PATCH] Feature cross scope role principals (#1199) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 🤖 add scope column to role principals and group members * chore: 🤖 add recursion and filtering to user and group mocks * feat: 🎸 expose groups and roles on projects * feat: 🎸 enable cross-scope assignment of group members * chore: 🤖 query group members in a single call via filtering * chore: 🤖 query role prinicipals in two calls via filtering * chore: 🤖 use const instead of let * feat: 🎸 support adding cross-scope principals to roles --- .../app/routes/scopes/scope/roles/role/add-principals.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/admin/app/routes/scopes/scope/roles/role/add-principals.js b/ui/admin/app/routes/scopes/scope/roles/role/add-principals.js index 1d29243d7..af1b96692 100644 --- a/ui/admin/app/routes/scopes/scope/roles/role/add-principals.js +++ b/ui/admin/app/routes/scopes/scope/roles/role/add-principals.js @@ -20,11 +20,13 @@ export default class ScopesScopeRolesRoleAddPrincipalsRoute extends Route { */ model() { const role = this.modelFor('scopes.scope.roles.role'); - const { scopeID: scope_id } = role; return hash({ role, - users: this.store.query('user', { scope_id }), - groups: this.store.query('group', { scope_id }), + users: this.store.query('user', { scope_id: 'global', recursive: true }), + groups: this.store.query('group', { + scope_id: 'global', + recursive: true, + }), }); }