|
@@ -526,8 +526,14 @@ module.exports = function(crowi, app) {
|
|
|
debug('form content', form);
|
|
debug('form content', form);
|
|
|
return saveSettingAsync(form)
|
|
return saveSettingAsync(form)
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- // re-setup strategy (force: true)
|
|
|
|
|
- crowi.passportService.setupLdapStrategy(true);
|
|
|
|
|
|
|
+ const config = crowi.getConfig();
|
|
|
|
|
+
|
|
|
|
|
+ // reset strategy
|
|
|
|
|
+ crowi.passportService.resetLdapStrategy();
|
|
|
|
|
+ // setup strategy
|
|
|
|
|
+ if (Config.isEnabledPassportLdap(config)) {
|
|
|
|
|
+ crowi.passportService.setupLdapStrategy(true);
|
|
|
|
|
+ }
|
|
|
return;
|
|
return;
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|