This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
hymenobacterdotinfo/app/mixins/setup-metadata.js
2015-11-06 11:20:28 -07:00

16 lines
405 B
JavaScript

import Ember from 'ember';
const { Mixin, inject: { service }} = Ember;
export default Mixin.create({
currentUser: service('session-account'),
metaData: null,
isAdmin: null,
setupMetaDataOnInit: Ember.on('init', function() {
this.get('currentUser.account').then((user) => {
this.set('metaData', user.get('metaData'));
this.set('isAdmin', user.get('isAdmin'));
});
}),
});