mirror of https://gitee.com/topiam/eiam
fix: 更新身份源配置&保存存储配置
parent
2b5a21e345
commit
afc4b5e441
|
@ -115,7 +115,7 @@ public interface IdentitySourceRepository extends LogicDeleteRepository<Identity
|
|||
void deleteById(@NonNull Long id);
|
||||
|
||||
/**
|
||||
* 更新设分院策略
|
||||
* 更新身份源策略
|
||||
*
|
||||
* @param id {@link Long} 主键
|
||||
* @param strategyConfig {@link String} 策略
|
||||
|
@ -123,7 +123,7 @@ public interface IdentitySourceRepository extends LogicDeleteRepository<Identity
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
@Modifying
|
||||
@CacheEvict(allEntries = true)
|
||||
@Query(value = "UPDATE IdentitySourceEntity SET strategyConfig=:strategyConfig where id=:id")
|
||||
@Query(value = "UPDATE identity_source SET strategy_config = :strategyConfig where id_ = :id", nativeQuery = true)
|
||||
void updateStrategyConfig(@Param(value = "id") Long id,
|
||||
@Param(value = "strategyConfig") String strategyConfig);
|
||||
|
||||
|
|
|
@ -177,9 +177,13 @@ public class SettingHelp {
|
|||
public static void addImgSrcHostContentSecurityPolicy(String value) {
|
||||
SettingEntity settingEntity = getSettingRepository()
|
||||
.findByName(SECURITY_DEFENSE_POLICY_CONTENT_SECURITY_POLICY);
|
||||
String contentSecurityPolicy = SECURITY_DEFENSE_POLICY_DEFAULT_SETTINGS
|
||||
.get(SECURITY_DEFENSE_POLICY_CONTENT_SECURITY_POLICY);
|
||||
if (!Objects.isNull(settingEntity)) {
|
||||
String contentSecurityPolicy;
|
||||
if (Objects.isNull(settingEntity)) {
|
||||
settingEntity = new SettingEntity();
|
||||
settingEntity.setName(SECURITY_DEFENSE_POLICY_CONTENT_SECURITY_POLICY);
|
||||
contentSecurityPolicy = SECURITY_DEFENSE_POLICY_DEFAULT_SETTINGS
|
||||
.get(SECURITY_DEFENSE_POLICY_CONTENT_SECURITY_POLICY);
|
||||
} else {
|
||||
contentSecurityPolicy = settingEntity.getValue();
|
||||
}
|
||||
Policy parse = ContentSecurityPolicyUtils.parse(contentSecurityPolicy);
|
||||
|
|
Loading…
Reference in New Issue