2019-10-22 09:46:10 -04:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
2018-06-15 11:03:24 -04:00
|
|
|
import { exportEntity } from "discourse/lib/export-csv";
|
|
|
|
import { outputExportResult } from "discourse/lib/export-result";
|
|
|
|
import AdminUser from "admin/models/admin-user";
|
2014-12-12 10:49:57 -05:00
|
|
|
|
2019-10-22 09:46:10 -04:00
|
|
|
export default DiscourseRoute.extend({
|
2014-12-02 05:35:43 -05:00
|
|
|
actions: {
|
2015-11-20 15:07:04 -05:00
|
|
|
exportUsers() {
|
2018-06-15 11:03:24 -04:00
|
|
|
exportEntity("user_list", {
|
|
|
|
trust_level: this.controllerFor("admin-users-list-show").get("query")
|
|
|
|
}).then(outputExportResult);
|
2014-12-03 10:03:42 -05:00
|
|
|
},
|
|
|
|
|
2015-11-20 15:07:04 -05:00
|
|
|
sendInvites() {
|
2019-07-26 05:20:11 -04:00
|
|
|
this.transitionTo("userInvited", this.currentUser);
|
2015-02-17 03:03:43 -05:00
|
|
|
},
|
|
|
|
|
2015-11-20 15:07:04 -05:00
|
|
|
deleteUser(user) {
|
2015-11-20 20:27:06 -05:00
|
|
|
AdminUser.create(user).destroy({ deletePosts: true });
|
2014-12-02 05:35:43 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|