mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 07:11:17 +08:00
FEATURE: Allow admins to delete user SSO records in the UI (#10669)
Also displays the user's last payload in the admin UI to help with debugging SSO issues.
This commit is contained in:
@ -132,6 +132,11 @@ export default Controller.extend(CanCheckEmails, {
|
||||
.catch(() => bootbox.alert(I18n.t("generic_error")));
|
||||
},
|
||||
|
||||
@discourseComputed("model.single_sign_on_record.last_payload")
|
||||
ssoPayload(lastPayload) {
|
||||
return lastPayload.split("&");
|
||||
},
|
||||
|
||||
actions: {
|
||||
impersonate() {
|
||||
return this.model.impersonate();
|
||||
@ -321,5 +326,16 @@ export default Controller.extend(CanCheckEmails, {
|
||||
resetPrimaryGroup() {
|
||||
this.set("model.primary_group_id", this.originalPrimaryGroupId);
|
||||
},
|
||||
|
||||
deleteSSORecord() {
|
||||
return bootbox.confirm(
|
||||
I18n.t("admin.user.sso.confirm_delete"),
|
||||
I18n.t("no_value"),
|
||||
I18n.t("yes_value"),
|
||||
() => {
|
||||
return this.model.deleteSSORecord();
|
||||
}
|
||||
);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user