1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-08 15:05:28 +02:00

Update application.js

This commit is contained in:
Harvey Kandola 2016-06-25 10:39:50 -07:00 committed by zinyando
parent 7e31b459b3
commit 86aaead1ce

View file

@ -12,9 +12,15 @@
import Ember from 'ember';
import netUtil from '../utils/net';
const {
inject: { service }
} = Ember;
export default Ember.Route.extend({
userService: Ember.inject.service('user'),
sessionService: Ember.inject.service('session'),
userService: service('user'),
sessionService: service('session'),
appMeta: service(),
transitioning: false,
beforeModel: function(transition) {
@ -22,7 +28,7 @@ export default Ember.Route.extend({
let session = this.get('sessionService');
// Session ready?
return session.boot().then(function() {
return this.get('appMeta').boot().then(function() {
// Need to authenticate?
if (!session.get("appMeta.allowAnonymousAccess") && !session.get("authenticated") &&
is.not.startWith(transition.targetName, 'auth.')) {