mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
feat: certEditPage will be redirected to 404 when name is changed (#3154)
This commit is contained in:
parent
45dd4cc344
commit
ec98785172
@ -288,14 +288,14 @@ class CertEditPage extends React.Component {
|
|||||||
Setting.showMessage("success", i18next.t("general:Successfully saved"));
|
Setting.showMessage("success", i18next.t("general:Successfully saved"));
|
||||||
this.setState({
|
this.setState({
|
||||||
certName: this.state.cert.name,
|
certName: this.state.cert.name,
|
||||||
});
|
}, () => {
|
||||||
|
|
||||||
if (exitAfterSave) {
|
if (exitAfterSave) {
|
||||||
this.props.history.push("/certs");
|
this.props.history.push("/certs");
|
||||||
} else {
|
} else {
|
||||||
this.props.history.push(`/certs/${this.state.cert.owner}/${this.state.cert.name}`);
|
this.props.history.push(`/certs/${this.state.cert.owner}/${this.state.cert.name}`);
|
||||||
this.getCert();
|
this.getCert();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
Setting.showMessage("error", `${i18next.t("general:Failed to save")}: ${res.msg}`);
|
Setting.showMessage("error", `${i18next.t("general:Failed to save")}: ${res.msg}`);
|
||||||
this.updateCertField("name", this.state.certName);
|
this.updateCertField("name", this.state.certName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user