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';
|
import Ember from 'ember';
|
||||||
|
|
||||||
export default Ember.Controller.extend({
|
const { Controller } = Ember;
|
||||||
queryParams: ['token'],
|
|
||||||
|
|
||||||
|
export default Controller.extend({
|
||||||
|
queryParams: ['token'],
|
||||||
|
token: null,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
import UnauthenticatedRouteMixin from 'ember-simple-auth/mixins/unauthenticated-route-mixin';
|
import UnauthenticatedRouteMixin from 'ember-simple-auth/mixins/unauthenticated-route-mixin';
|
||||||
|
|
||||||
export default Ember.Route.extend(UnauthenticatedRouteMixin, {
|
const { Route, get, inject: { service } } = Ember;
|
||||||
session: Ember.inject.service('session'),
|
|
||||||
currentUser: Ember.inject.service('session-account'),
|
export default Route.extend(UnauthenticatedRouteMixin, {
|
||||||
|
session: service(),
|
||||||
|
currentUser: service('session-account'),
|
||||||
|
|
||||||
beforeModel: function(transition) {
|
beforeModel: function(transition) {
|
||||||
this._super(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('session').authenticate('authenticator:jwt-resolved', token).then(() => {
|
||||||
this.get('currentUser.account').then((account) => {
|
this.get('currentUser.account').then((account) => {
|
||||||
this.transitionTo('protected.users.changepassword', account.get('id'));
|
this.transitionTo('protected.users.changepassword', account.get('id'));
|
||||||
|
|
Reference in a new issue