mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
0e9d4e6792
Refs #4001 - grunt-jscs@0.8.1 which provides ES6 support.
32 lines
690 B
JavaScript
32 lines
690 B
JavaScript
var CurrentUserSettings = Ember.Mixin.create({
|
|
currentUser: function () {
|
|
return this.store.find('user', 'me');
|
|
},
|
|
|
|
transitionAuthor: function () {
|
|
var self = this;
|
|
|
|
return function (user) {
|
|
if (user.get('isAuthor')) {
|
|
return self.transitionTo('settings.users.user', user);
|
|
}
|
|
|
|
return user;
|
|
};
|
|
},
|
|
|
|
transitionEditor: function () {
|
|
var self = this;
|
|
|
|
return function (user) {
|
|
if (user.get('isEditor')) {
|
|
return self.transitionTo('settings.users');
|
|
}
|
|
|
|
return user;
|
|
};
|
|
}
|
|
});
|
|
|
|
export default CurrentUserSettings;
|