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:
parent
7e31b459b3
commit
86aaead1ce
1 changed files with 9 additions and 3 deletions
|
@ -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.')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue