FIX: hide sso payload behind a button click and log views (#12110)

This commit is contained in:
Arpit Jalan
2021-02-17 21:27:51 +05:30
committed by GitHub
parent 431c6de480
commit a174c8b8d4
8 changed files with 81 additions and 17 deletions

View File

@@ -22,6 +22,7 @@ export default Controller.extend(CanCheckEmails, {
availableGroups: null,
userTitleValue: null,
ssoExternalEmail: null,
ssoLastPayload: null,
showBadges: setting("enable_badges"),
hasLockedTrustLevel: notEmpty("model.manual_locked_trust_level"),
@@ -137,7 +138,7 @@ export default Controller.extend(CanCheckEmails, {
.catch(() => bootbox.alert(I18n.t("generic_error")));
},
@discourseComputed("model.single_sign_on_record.last_payload")
@discourseComputed("ssoLastPayload")
ssoPayload(lastPayload) {
return lastPayload.split("&");
},
@@ -610,5 +611,15 @@ export default Controller.extend(CanCheckEmails, {
}
});
},
checkSsoPayload() {
return ajax(userPath(`${this.model.username_lower}/sso-payload.json`), {
data: { context: window.location.pathname },
}).then((result) => {
if (result) {
this.set("ssoLastPayload", result.payload);
}
});
},
},
});