kaori 3 лет назад
Родитель
Сommit
67344fb394

+ 17 - 17
packages/app/src/components/Admin/Security/LdapSecuritySetting.jsx

@@ -13,23 +13,23 @@ import LdapSecuritySettingContents from './LdapSecuritySettingContents';
 let retrieveErrors = null;
 function LdapSecuritySetting(props) {
   const { adminLdapSecurityContainer } = props;
-  if (adminLdapSecurityContainer.state.serverUrl === adminLdapSecurityContainer.dummyServerUrl) {
-    throw (async() => {
-      try {
-        await adminLdapSecurityContainer.retrieveSecurityData();
-      }
-      catch (err) {
-        const errs = toArrayIfNot(err);
-        toastError(errs);
-        retrieveErrors = errs;
-        adminLdapSecurityContainer.setState({ serverUrl: adminLdapSecurityContainer.dummyServerUrlForError });
-      }
-    })();
-  }
-
-  if (adminLdapSecurityContainer.state.serverUrl === adminLdapSecurityContainer.dummyServerUrlForError) {
-    throw new Error(`${retrieveErrors.length} errors occured`);
-  }
+  // if (adminLdapSecurityContainer.state.serverUrl === adminLdapSecurityContainer.dummyServerUrl) {
+  //   throw (async() => {
+  //     try {
+  //       await adminLdapSecurityContainer.retrieveSecurityData();
+  //     }
+  //     catch (err) {
+  //       const errs = toArrayIfNot(err);
+  //       toastError(errs);
+  //       retrieveErrors = errs;
+  //       adminLdapSecurityContainer.setState({ serverUrl: adminLdapSecurityContainer.dummyServerUrlForError });
+  //     }
+  //   })();
+  // }
+
+  // if (adminLdapSecurityContainer.state.serverUrl === adminLdapSecurityContainer.dummyServerUrlForError) {
+  //   throw new Error(`${retrieveErrors.length} errors occured`);
+  // }
 
   return <LdapSecuritySettingContents />;
 }

+ 2 - 2
packages/app/src/components/Admin/Security/SecurityManagementContents.jsx

@@ -9,7 +9,7 @@ import CustomNav from '../../CustomNavigation/CustomNav';
 // import FacebookSecuritySetting from './FacebookSecuritySetting';
 // import GitHubSecuritySetting from './GitHubSecuritySetting';
 // import GoogleSecuritySetting from './GoogleSecuritySetting';
-// import LdapSecuritySetting from './LdapSecuritySetting';
+import LdapSecuritySetting from './LdapSecuritySetting';
 import LocalSecuritySetting from './LocalSecuritySetting';
 // import OidcSecuritySetting from './OidcSecuritySetting';
 // import SamlSecuritySetting from './SamlSecuritySetting';
@@ -115,7 +115,7 @@ const SecurityManagementContents = () => {
             {activeComponents.has('passport_local') && <LocalSecuritySetting />}
           </TabPane>
           <TabPane tabId="passport_ldap">
-            {/* {activeComponents.has('passport_ldap') && <LdapSecuritySetting />} */}
+            {activeComponents.has('passport_ldap') && <LdapSecuritySetting />}
           </TabPane>
           <TabPane tabId="passport_saml">
             {/* {activeComponents.has('passport_saml') && <SamlSecuritySetting />} */}