2015-07-24 12:33:53 -04:00
|
|
|
import { exportEntity } from 'discourse/lib/export-csv';
|
2014-12-22 11:17:04 -05:00
|
|
|
import { outputExportResult } from 'discourse/lib/export-result';
|
2015-11-20 20:27:06 -05:00
|
|
|
import AdminUser from 'admin/models/admin-user';
|
2014-12-12 10:49:57 -05:00
|
|
|
|
2014-12-02 05:35:43 -05:00
|
|
|
export default Discourse.Route.extend({
|
|
|
|
|
|
|
|
actions: {
|
2015-11-20 15:07:04 -05:00
|
|
|
exportUsers() {
|
2015-07-24 12:33:53 -04:00
|
|
|
exportEntity('user_list').then(outputExportResult);
|
2014-12-03 10:03:42 -05:00
|
|
|
},
|
|
|
|
|
2015-11-20 15:07:04 -05:00
|
|
|
sendInvites() {
|
2015-07-13 23:37:53 -04:00
|
|
|
this.transitionTo('userInvited', Discourse.User.current());
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|