Ghost/ghost/admin/app/mixins/current-user-settings.js

26 lines
497 B
JavaScript
Raw Normal View History

2015-02-13 07:22:32 +03:00
import Ember from 'ember';
const {Mixin} = Ember;
export default Mixin.create({
transitionAuthor() {
return (user) => {
if (user.get('isAuthor')) {
return this.transitionTo('team.user', user);
}
return user;
};
},
transitionEditor() {
return (user) => {
if (user.get('isEditor')) {
return this.transitionTo('team');
}
return user;
};
}
});