FEATURE: admin UI to merge two users. (#9509)

This commit is contained in:
Vinoth Kannan
2020-04-22 14:07:51 +05:30
committed by GitHub
parent 13956017da
commit a511bea4cc
13 changed files with 238 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
import discourseComputed from "discourse-common/utils/decorators";
import { fmt } from "discourse/lib/computed";
import { htmlSafe } from "@ember/template";
import showModal from "discourse/lib/show-modal";
export default Controller.extend(CanCheckEmails, {
adminTools: service(),
@ -207,6 +208,27 @@ export default Controller.extend(CanCheckEmails, {
}
},
promptTargetUser() {
showModal("admin-merge-users-prompt", {
admin: true,
model: this.model
});
},
showMergeConfirmation(targetUsername) {
showModal("admin-merge-users-confirmation", {
admin: true,
model: {
username: this.model.username,
targetUsername: targetUsername
}
});
},
merge(targetUsername) {
return this.model.merge({ targetUsername: targetUsername });
},
viewActionLogs() {
this.adminTools.showActionLogs(this, {
target_user: this.get("model.username")