|
|
@@ -4,7 +4,7 @@ import { withTranslation } from 'react-i18next';
|
|
|
import loggerFactory from '@alias/logger';
|
|
|
|
|
|
import { createSubscribedElement } from '../../UnstatedUtils';
|
|
|
-import { toastError } from '../../../util/apiNotification';
|
|
|
+import { toastSuccess, toastError } from '../../../util/apiNotification';
|
|
|
|
|
|
import AppContainer from '../../../services/AppContainer';
|
|
|
import AdminGeneralSecurityContainer from '../../../services/AdminGeneralSecurityContainer';
|
|
|
@@ -21,6 +21,7 @@ class LdapSecuritySetting extends React.Component {
|
|
|
retrieveError: null,
|
|
|
};
|
|
|
|
|
|
+ this.onClickSubmit = this.onClickSubmit.bind(this);
|
|
|
}
|
|
|
|
|
|
async componentDidMount() {
|
|
|
@@ -36,6 +37,19 @@ class LdapSecuritySetting extends React.Component {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ async onClickSubmit() {
|
|
|
+ const { t, adminLdapSecurityContainer } = this.props;
|
|
|
+
|
|
|
+ try {
|
|
|
+ await adminLdapSecurityContainer.updateLdapSetting();
|
|
|
+ toastSuccess(t('security_setting.SAML.updated_saml'));
|
|
|
+ }
|
|
|
+ catch (err) {
|
|
|
+ toastError(err);
|
|
|
+ logger.error(err);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
const { t, adminGeneralSecurityContainer, adminLdapSecurityContainer } = this.props;
|
|
|
const { isLdapEnabled } = adminGeneralSecurityContainer.state;
|