mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
2048110167
issue #5434 - move users routes/views/controllers out of settings - rename users team - update nav-menu.hbs - remove legacy routes - fix up tests
29 lines
612 B
JavaScript
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;
|