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
468 B
JavaScript
Raw Normal View History

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