Lint user lockout
This commit is contained in:
parent
45703e67ee
commit
367341c780
2 changed files with 10 additions and 6 deletions
|
@ -1,6 +1,8 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
queryParams: ['token'],
|
||||
const { Controller } = Ember;
|
||||
|
||||
export default Controller.extend({
|
||||
queryParams: ['token'],
|
||||
token: null,
|
||||
});
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
import Ember from 'ember';
|
||||
import UnauthenticatedRouteMixin from 'ember-simple-auth/mixins/unauthenticated-route-mixin';
|
||||
|
||||
export default Ember.Route.extend(UnauthenticatedRouteMixin, {
|
||||
session: Ember.inject.service('session'),
|
||||
currentUser: Ember.inject.service('session-account'),
|
||||
const { Route, get, inject: { service } } = Ember;
|
||||
|
||||
export default Route.extend(UnauthenticatedRouteMixin, {
|
||||
session: service(),
|
||||
currentUser: service('session-account'),
|
||||
|
||||
beforeModel: function(transition) {
|
||||
this._super(transition);
|
||||
|
||||
let token = Ember.get(transition, 'queryParams.token');
|
||||
const token = get(transition, 'queryParams.token');
|
||||
this.get('session').authenticate('authenticator:jwt-resolved', token).then(() => {
|
||||
this.get('currentUser.account').then((account) => {
|
||||
this.transitionTo('protected.users.changepassword', account.get('id'));
|
||||
|
|
Reference in a new issue