SSO: fix exist certificate
This commit is contained in:
parent
b252732ed2
commit
e6651821ce
@ -46,7 +46,7 @@ const AddIdpCertificateModal = (props) => {
|
||||
<ModalDialog.Footer>
|
||||
<Button
|
||||
label={t("Common:OKButton")}
|
||||
onClick={addIdpCertificate}
|
||||
onClick={() => addIdpCertificate(t)}
|
||||
primary
|
||||
scale
|
||||
isLoading={isCertificateLoading}
|
||||
|
@ -81,7 +81,7 @@ const AddSpCertificateModal = (props) => {
|
||||
<ModalDialog.Footer>
|
||||
<Button
|
||||
label={t("Common:OKButton")}
|
||||
onClick={addSpCertificate}
|
||||
onClick={() => addSpCertificate(t)}
|
||||
primary
|
||||
size="normalTouchscreen"
|
||||
isLoading={isCertificateLoading}
|
||||
|
@ -576,7 +576,7 @@ class SsoFormStore {
|
||||
);
|
||||
};
|
||||
|
||||
addSpCertificate = async () => {
|
||||
addSpCertificate = async (t) => {
|
||||
const data = [
|
||||
{
|
||||
crt: this.spCertificate,
|
||||
@ -585,6 +585,11 @@ class SsoFormStore {
|
||||
},
|
||||
];
|
||||
|
||||
if (this.spCertificates.find((item) => item.action === this.spAction)) {
|
||||
toastr.error(t("CertificateExist"));
|
||||
return;
|
||||
}
|
||||
|
||||
this.isCertificateLoading = true;
|
||||
|
||||
try {
|
||||
@ -606,7 +611,7 @@ class SsoFormStore {
|
||||
}
|
||||
};
|
||||
|
||||
addIdpCertificate = async () => {
|
||||
addIdpCertificate = async (t) => {
|
||||
const data = [
|
||||
{
|
||||
crt: this.idpCertificate,
|
||||
@ -615,6 +620,11 @@ class SsoFormStore {
|
||||
},
|
||||
];
|
||||
|
||||
if (this.idpCertificates.find((item) => item.crt === this.idpCertificate)) {
|
||||
toastr.error(t("CertificateExist"));
|
||||
return;
|
||||
}
|
||||
|
||||
this.isCertificateLoading = true;
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user