open-nomad/ui/app/routes/jobs/job.js
Michael Lange dc20fc88b9 Unload all records when a token is set or cleared
This guarantees no privileged data is shown to unprivileged credentials
2017-10-18 16:42:08 -07:00

15 lines
319 B
JavaScript

import Ember from 'ember';
import notifyError from 'nomad-ui/utils/notify-error';
const { Route, inject } = Ember;
export default Route.extend({
store: inject.service(),
model({ job_id }) {
return this.get('store')
.findRecord('job', job_id, { reload: true })
.catch(notifyError(this));
},
});