mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 07:34:18 +08:00
FIX: Could navigate back to "Preferences" from "Change Email"
This commit is contained in:
parent
ae06ea6323
commit
03779697e7
|
@ -11,10 +11,6 @@ Discourse.PreferencesRoute = Discourse.RestrictedUserRoute.extend({
|
||||||
return this.modelFor('user');
|
return this.modelFor('user');
|
||||||
},
|
},
|
||||||
|
|
||||||
renderTemplate: function() {
|
|
||||||
this.render('preferences', { into: 'user', outlet: 'userOutlet', controller: 'preferences' });
|
|
||||||
},
|
|
||||||
|
|
||||||
setupController: function(controller, model) {
|
setupController: function(controller, model) {
|
||||||
controller.set('model', model);
|
controller.set('model', model);
|
||||||
this.controllerFor('user').set('indexStream', false);
|
this.controllerFor('user').set('indexStream', false);
|
||||||
|
@ -51,6 +47,12 @@ Discourse.PreferencesRoute = Discourse.RestrictedUserRoute.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Discourse.PreferencesIndexRoute = Discourse.RestrictedUserRoute.extend({
|
||||||
|
renderTemplate: function() {
|
||||||
|
this.render('preferences', { into: 'user', outlet: 'userOutlet', controller: 'preferences' });
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The route for editing a user's "About Me" bio.
|
The route for editing a user's "About Me" bio.
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ Discourse.UserRoute = Discourse.Route.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
model: function(params) {
|
model: function(params) {
|
||||||
|
|
||||||
// If we're viewing the currently logged in user, return that object
|
// If we're viewing the currently logged in user, return that object
|
||||||
// instead.
|
// instead.
|
||||||
var currentUser = Discourse.User.current();
|
var currentUser = Discourse.User.current();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user