mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 21:15:52 +08:00
21 lines
454 B
Plaintext
21 lines
454 B
Plaintext
|
export default Discourse.Route.extend({
|
||
|
serialize(model) {
|
||
|
return { username: model.get('username').toLowerCase() };
|
||
|
},
|
||
|
|
||
|
model(params) {
|
||
|
return Discourse.AdminUser.find(Em.get(params, 'username').toLowerCase());
|
||
|
},
|
||
|
|
||
|
renderTemplate() {
|
||
|
this.render({into: 'admin'});
|
||
|
},
|
||
|
|
||
|
afterModel(adminUser) {
|
||
|
return adminUser.loadDetails().then(function () {
|
||
|
adminUser.setOriginalTrustLevel();
|
||
|
return adminUser;
|
||
|
});
|
||
|
}
|
||
|
});
|