Ghost/ghost/admin/app/mixins/current-user-settings.js
cobbspur 2048110167 Move users routes out of settings & change to team
issue #5434

- move users routes/views/controllers out of settings
- rename users team
- update nav-menu.hbs
- remove legacy routes
- fix up tests
2015-06-18 19:46:46 +01:00

29 lines
612 B
JavaScript

import Ember from 'ember';
var CurrentUserSettings = Ember.Mixin.create({
transitionAuthor: function () {
var self = this;
return function (user) {
if (user.get('isAuthor')) {
return self.transitionTo('team.user', user);
}
return user;
};
},
transitionEditor: function () {
var self = this;
return function (user) {
if (user.get('isEditor')) {
return self.transitionTo('team');
}
return user;
};
}
});
export default CurrentUserSettings;