mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-10 11:44:04 +08:00
ldap配置优化
This commit is contained in:
parent
700da4c468
commit
baf4d50b33
@ -23,6 +23,7 @@ import xyz.playedu.common.annotation.BackendPermission;
|
|||||||
import xyz.playedu.common.annotation.Log;
|
import xyz.playedu.common.annotation.Log;
|
||||||
import xyz.playedu.common.constant.BPermissionConstant;
|
import xyz.playedu.common.constant.BPermissionConstant;
|
||||||
import xyz.playedu.common.constant.BusinessTypeConstant;
|
import xyz.playedu.common.constant.BusinessTypeConstant;
|
||||||
|
import xyz.playedu.common.constant.ConfigConstant;
|
||||||
import xyz.playedu.common.constant.SystemConstant;
|
import xyz.playedu.common.constant.SystemConstant;
|
||||||
import xyz.playedu.common.domain.AppConfig;
|
import xyz.playedu.common.domain.AppConfig;
|
||||||
import xyz.playedu.common.service.AppConfigService;
|
import xyz.playedu.common.service.AppConfigService;
|
||||||
@ -62,10 +63,20 @@ public class AppConfigController {
|
|||||||
req.getData()
|
req.getData()
|
||||||
.forEach(
|
.forEach(
|
||||||
(key, value) -> {
|
(key, value) -> {
|
||||||
|
// 过滤掉未变动的private配置
|
||||||
if (SystemConstant.CONFIG_MASK.equals(value)) {
|
if (SystemConstant.CONFIG_MASK.equals(value)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
data.put(key, value);
|
String saveValue = value;
|
||||||
|
|
||||||
|
// LDAP的url配置自动加ldap://处理
|
||||||
|
if (ConfigConstant.LDAP_URL.equals(key)
|
||||||
|
&& StringUtil.isNotEmpty(value)
|
||||||
|
&& !StringUtil.startsWithIgnoreCase(value, "ldap://")) {
|
||||||
|
saveValue = "ldap://" + saveValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
data.put(key, saveValue);
|
||||||
});
|
});
|
||||||
configService.saveFromMap(data);
|
configService.saveFromMap(data);
|
||||||
return JsonResponse.data(null);
|
return JsonResponse.data(null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user