Skip to content

Commit

Permalink
Drop rsvp
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Sep 27, 2023
1 parent f0954e9 commit 8e373f1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ui/app/routes/access-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Route from '@ember/routing/route';
import withForbiddenState from 'nomad-ui/mixins/with-forbidden-state';
import WithModelErrorHandling from 'nomad-ui/mixins/with-model-error-handling';
import { inject as service } from '@ember/service';
import RSVP from 'rsvp';

export default class AccessControlRoute extends Route.extend(
withForbiddenState,
Expand All @@ -29,11 +28,14 @@ export default class AccessControlRoute extends Route.extend(

// Load our tokens, roles, and policies
async model() {
return RSVP.hash({
policies: await this.store.findAll('policy'),
tokens: await this.store.findAll('token'),
roles: await this.store.findAll('role'),
});
const policies = await this.store.findAll('policy');
const roles = await this.store.findAll('role');
const tokens = await this.store.findAll('token');
return {
policies,
roles,
tokens,
};
}

// After model: check for all tokens[].policies and roles[].policies to see if any of them are listed
Expand Down

0 comments on commit 8e373f1

Please sign in to comment.