Merge pull request #3814 from pedroigor/authz-export-fixes

Authz export fixes
This commit is contained in:
Pedro Igor 2017-01-31 15:57:40 -02:00 committed by GitHub
commit 0c16a15b7d
2 changed files with 2 additions and 2 deletions

View file

@ -801,7 +801,7 @@ public class ModelToRepresentation {
representation.setType(model.getType());
representation.setDecisionStrategy(model.getDecisionStrategy());
representation.setLogic(model.getLogic());
representation.setConfig(model.getConfig());
representation.setConfig(new HashMap<>(model.getConfig()));
return representation;
}

View file

@ -371,7 +371,7 @@ public class ExportUtils {
Set<Resource> policyResources = policy.getResources();
if (!policyResources.isEmpty()) {
List<String> resourceNames = scopes.stream().map(Scope::getName).collect(Collectors.toList());
List<String> resourceNames = policyResources.stream().map(Resource::getName).collect(Collectors.toList());
config.put("resources", JsonSerialization.writeValueAsString(resourceNames));
}