Browse Source

REPORT-135874 fix: 修复无法获取远程环境脱敏规则的问题

fbp/release
Anner 2 months ago
parent
commit
f22127c6da
  1. 8
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/UpdateDataWorker.java

8
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/UpdateDataWorker.java

@ -1,10 +1,8 @@
package com.fr.design.mainframe.cell.settingpane.desensitization.model; package com.fr.design.mainframe.cell.settingpane.desensitization.model;
import com.fr.base.operator.org.OrganizationOperator;
import com.fr.data.desensitize.rule.DesensitizationRuleManager;
import com.fr.data.desensitize.rule.base.DesensitizationRule; import com.fr.data.desensitize.rule.base.DesensitizationRule;
import com.fr.data.desensitize.rule.base.DesensitizationRuleSource; import com.fr.data.desensitize.rule.base.DesensitizationRuleSource;
import com.fr.workspace.WorkContext; import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
import java.util.HashMap; import java.util.HashMap;
@ -26,8 +24,8 @@ public class UpdateDataWorker extends SwingWorker<Map<String, Object>, Void> {
@Override @Override
protected Map<String, Object> doInBackground() { protected Map<String, Object> doInBackground() {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
Map<String, String> allRoles = WorkContext.getCurrent().get(OrganizationOperator.class).getAllRoles4Desensitization(); Map<String, String> allRoles = RemoteAuthorityRepository.getInstance().getAllRoles4Desensitization();
Map<DesensitizationRuleSource, Map<String, DesensitizationRule>> allRules = DesensitizationRuleManager.getInstance().getAllRules(); Map<DesensitizationRuleSource, Map<String, DesensitizationRule>> allRules = RemoteAuthorityRepository.getInstance().getAllRoles().getSourceRuleMap();
result.put(ROLE_KEY, allRoles); result.put(ROLE_KEY, allRoles);
result.put(RULE_KEY, allRules); result.put(RULE_KEY, allRules);

Loading…
Cancel
Save