From 9e005a73bbbd8791eb903ac15565893388eb41e9 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Fri, 12 Nov 2021 10:31:13 -0800 Subject: [PATCH] Remove accounts route in favour of members --- ui/admin/app/router.js | 1 - .../managed-groups/managed-group/accounts.js | 26 -------- .../managed-groups/managed-group/accounts.hbs | 62 ------------------- .../managed-group/accounts-test.js | 16 ----- 4 files changed, 105 deletions(-) delete mode 100644 ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts.js delete mode 100644 ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts.hbs delete mode 100644 ui/admin/tests/unit/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts-test.js diff --git a/ui/admin/app/router.js b/ui/admin/app/router.js index 3ac54a0ea..ef557fbc8 100644 --- a/ui/admin/app/router.js +++ b/ui/admin/app/router.js @@ -60,7 +60,6 @@ Router.map(function () { 'managed-group', { path: ':managed_group_id' }, function () { - this.route('accounts'); this.route('members'); } ); diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts.js deleted file mode 100644 index e3bdc5a91..000000000 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts.js +++ /dev/null @@ -1,26 +0,0 @@ -import Route from '@ember/routing/route'; -import { inject as service } from '@ember/service'; - -export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsManagedGroupAccountsRoute extends Route { - // =services - - @service resourceFilterStore; - - // =methods - - /** - * Returns the previously loaded managed group instances accounts. - * @return {Promise{[AccountModel]}} - */ - model() { - const { auth_method_id, member_ids } = this.modelFor( - 'scopes.scope.auth-methods.auth-method.managed-groups.managed-group' - ); - - return this.resourceFilterStore.queryBy( - 'account', - { id: member_ids }, - { auth_method_id } - ); - } -} diff --git a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts.hbs b/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts.hbs deleted file mode 100644 index 2a1b1f286..000000000 --- a/ui/admin/app/templates/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts.hbs +++ /dev/null @@ -1,62 +0,0 @@ -{{page-title (t 'resources.account.title_plural')}} - -{{#if @model}} - - - - {{t 'form.name.label'}} - {{t 'form.issuer.label'}} - {{t 'form.subject.label'}} - {{t 'form.email.label'}} - {{t 'form.full_name.label'}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - - - - {{#each @model as |account|}} - - - {{account.accountName}} -

{{account.description}}

-
- - {{account.attributes.issuer}} - - - {{account.attributes.subject}} - - - {{account.attributes.email}} - - - {{account.attributes.full_name}} - - - {{account.type}} - - - - {{account.id}} - - -
- {{/each}} -
-
-{{else}} - - - - {{t 'resources.managed-group.messages.accounts.description'}} - - - -{{/if}} \ No newline at end of file diff --git a/ui/admin/tests/unit/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts-test.js b/ui/admin/tests/unit/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts-test.js deleted file mode 100644 index 5713dd02c..000000000 --- a/ui/admin/tests/unit/routes/scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { setupTest } from 'ember-qunit'; - -module( - 'Unit | Route | scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts', - function (hooks) { - setupTest(hooks); - - test('it exists', function (assert) { - let route = this.owner.lookup( - 'route:scopes/scope/auth-methods/auth-method/managed-groups/managed-group/accounts' - ); - assert.ok(route); - }); - } -);