mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 02:23:40 +08:00
f50280a889
This makes it easier to share bulk topic operations, for example from a plugin's custom topic list.
21 lines
454 B
JavaScript
21 lines
454 B
JavaScript
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;
|
|
});
|
|
}
|
|
});
|