Ghost/ghost/admin/app/instance-initializers/authentication.js

19 lines
438 B
JavaScript
Raw Normal View History

2015-02-13 07:22:32 +03: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
};