|
@@ -26,6 +26,7 @@ type Props = CommonProps & {
|
|
|
isMailerSetup: boolean,
|
|
isMailerSetup: boolean,
|
|
|
enabledStrategies: unknown,
|
|
enabledStrategies: unknown,
|
|
|
registrationWhiteList: string[],
|
|
registrationWhiteList: string[],
|
|
|
|
|
+ isLdapSetupFailed: boolean,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const LoginPage: NextPage<Props> = (props: Props) => {
|
|
const LoginPage: NextPage<Props> = (props: Props) => {
|
|
@@ -45,6 +46,7 @@ const LoginPage: NextPage<Props> = (props: Props) => {
|
|
|
objOfIsExternalAuthEnableds={props.enabledStrategies}
|
|
objOfIsExternalAuthEnableds={props.enabledStrategies}
|
|
|
isLocalStrategySetup={true}
|
|
isLocalStrategySetup={true}
|
|
|
isLdapStrategySetup={true}
|
|
isLdapStrategySetup={true}
|
|
|
|
|
+ isLdapSetupFailed={props.isLdapSetupFailed}
|
|
|
isEmailAuthenticationEnabled={false}
|
|
isEmailAuthenticationEnabled={false}
|
|
|
isRegistrationEnabled={true}
|
|
isRegistrationEnabled={true}
|
|
|
registrationWhiteList={props.registrationWhiteList}
|
|
registrationWhiteList={props.registrationWhiteList}
|
|
@@ -92,9 +94,11 @@ async function injectServerConfigurations(context: GetServerSidePropsContext, pr
|
|
|
const {
|
|
const {
|
|
|
mailService,
|
|
mailService,
|
|
|
configManager,
|
|
configManager,
|
|
|
|
|
+ passportService,
|
|
|
} = crowi;
|
|
} = crowi;
|
|
|
|
|
|
|
|
props.isMailerSetup = mailService.isMailerSetup;
|
|
props.isMailerSetup = mailService.isMailerSetup;
|
|
|
|
|
+ props.isLdapSetupFailed = configManager.getConfig('crowi', 'security:passport-ldap:isEnabled') && !passportService.isLdapStrategySetup;
|
|
|
props.registrationWhiteList = configManager.getConfig('crowi', 'security:registrationWhiteList');
|
|
props.registrationWhiteList = configManager.getConfig('crowi', 'security:registrationWhiteList');
|
|
|
}
|
|
}
|
|
|
|
|
|