SSO: fix exist certificate
This commit is contained in:
parent
b252732ed2
commit
e6651821ce
@ -46,7 +46,7 @@ const AddIdpCertificateModal = (props) => {
|
|||||||
<ModalDialog.Footer>
|
<ModalDialog.Footer>
|
||||||
<Button
|
<Button
|
||||||
label={t("Common:OKButton")}
|
label={t("Common:OKButton")}
|
||||||
onClick={addIdpCertificate}
|
onClick={() => addIdpCertificate(t)}
|
||||||
primary
|
primary
|
||||||
scale
|
scale
|
||||||
isLoading={isCertificateLoading}
|
isLoading={isCertificateLoading}
|
||||||
|
@ -81,7 +81,7 @@ const AddSpCertificateModal = (props) => {
|
|||||||
<ModalDialog.Footer>
|
<ModalDialog.Footer>
|
||||||
<Button
|
<Button
|
||||||
label={t("Common:OKButton")}
|
label={t("Common:OKButton")}
|
||||||
onClick={addSpCertificate}
|
onClick={() => addSpCertificate(t)}
|
||||||
primary
|
primary
|
||||||
size="normalTouchscreen"
|
size="normalTouchscreen"
|
||||||
isLoading={isCertificateLoading}
|
isLoading={isCertificateLoading}
|
||||||
|
@ -576,7 +576,7 @@ class SsoFormStore {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
addSpCertificate = async () => {
|
addSpCertificate = async (t) => {
|
||||||
const data = [
|
const data = [
|
||||||
{
|
{
|
||||||
crt: this.spCertificate,
|
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;
|
this.isCertificateLoading = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -606,7 +611,7 @@ class SsoFormStore {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
addIdpCertificate = async () => {
|
addIdpCertificate = async (t) => {
|
||||||
const data = [
|
const data = [
|
||||||
{
|
{
|
||||||
crt: this.idpCertificate,
|
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;
|
this.isCertificateLoading = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user