Ghost/ghost/admin/app/mixins/current-user-settings.js
Austin Burdine 13ceee3e9f Contributor Role (#948)
refs https://github.com/TryGhost/Ghost/issues/9314

* added save button for contributor
* hide tag filter & redirect to posts.index if post is published
* update editor controller test to need session service
2018-02-07 10:42:46 +01:00

24 lines
500 B
JavaScript

import Mixin from '@ember/object/mixin';
export default Mixin.create({
transitionAuthor() {
return (user) => {
if (user.get('isAuthorOrContributor')) {
return this.transitionTo('team.user', user);
}
return user;
};
},
transitionEditor() {
return (user) => {
if (user.get('isEditor')) {
return this.transitionTo('team');
}
return user;
};
}
});