Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkeychip committed Oct 8, 2024
1 parent 1198073 commit 2fb0ff0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/app/components/mfa/mfa-login-enforcement-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ export default class MfaLoginEnforcementForm extends Component {
selected: [],
};
@tracked authMethods = [];
@tracked mfaMethods = [];
@tracked modelErrors;

mfaMethods = []; // does not change after initial fetch, thus not tracked

constructor() {
super(...arguments);
// aggregate different target array properties on model into flat list
Expand All @@ -60,7 +61,6 @@ export default class MfaLoginEnforcementForm extends Component {
this.resetTargetState();
// only auth method types that have mounts can be selected as targets -- fetch from sys/auth and map by type
this.fetchAuthMethods();
// this.args.model.mfa_methods returns a PromiseManyArray. We need to resolve this before using it in the template.
this.fetchMfaMethods();
}

Expand Down Expand Up @@ -94,7 +94,7 @@ export default class MfaLoginEnforcementForm extends Component {
}
async fetchAuthMethods() {
const mounts = await this.store.findAll('auth-method');
this.authMethods = mounts.map((auth) => auth.type);
this.authMethods = mounts.map((auth) => auth.type).uniq();
}

async fetchMfaMethods() {
Expand Down

0 comments on commit 2fb0ff0

Please sign in to comment.