mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
f67147a685
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;
|