0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/app/instance-initializers/authentication.js

19 lines
438 B
JavaScript
Raw Normal View History

2015-02-12 21:22:32 -07:00
import Ember from 'ember';
export function initialize(instance) {
var store = instance.container.lookup('service:store'),
Session = instance.container.lookup('simple-auth-session:main');
Session.reopen({
user: Ember.computed(function () {
return store.findRecord('user', 'me');
})
});
}
export default {
name: 'authentication',
after: 'ember-data',
initialize: initialize
};