Skip to content

Commit

Permalink
restrict policy fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker committed Apr 9, 2024
1 parent 68ba65e commit 6c0e871
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -107,7 +108,11 @@ public PolicyFetchResult fetchPolicies(

// Fetch DataHubPolicyInfo aspects for each urn
final Map<Urn, EntityResponse> policyEntities =
entityClient.batchGetV2(opContext, POLICY_ENTITY_NAME, new HashSet<>(policyUrns), null);
entityClient.batchGetV2(
opContext,
POLICY_ENTITY_NAME,
new HashSet<>(policyUrns),
Set.of(DATAHUB_POLICY_INFO_ASPECT_NAME));
return new PolicyFetchResult(
policyUrns.stream()
.map(policyEntities::get)
Expand Down

0 comments on commit 6c0e871

Please sign in to comment.