mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-16 12:16:09 +03:00
dacd1060ee
Closes #3291 - Adds redirects based on roles as defined in the case - Adds new mixin `CurrentUserSettings` - For authors, all settings pages redirect to `users/self` - For editors, all settings pages other than specific users redirect to `users`. Any user that is not self or an author redirects to `users`
11 lines
313 B
JavaScript
11 lines
313 B
JavaScript
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
|
|
|
var UsersRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, CurrentUserSettings, {
|
|
beforeModel: function () {
|
|
return this.currentUser()
|
|
.then(this.transitionAuthor());
|
|
}
|
|
});
|
|
|
|
export default UsersRoute;
|