feat: List accounts within a managed group

This commit is contained in:
Susmitha Girumala committed 2021-11-12 11:22:16 -05:00
1 parent ff5cc71f60
commit be5f033712
11 files changed
+207 -6

No files matched your search

@@ -0,0 +1,26 @@
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 }
);
}
}