mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 13:01:07 +08:00
FEATURE: admin UI to merge two users. (#9509)
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user