mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
24 lines
485 B
JavaScript
24 lines
485 B
JavaScript
import Mixin from 'ember-metal/mixin';
|
|
|
|
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;
|
|
};
|
|
}
|
|
});
|