Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Mar 20, 2024
1 parent 39a20cb commit 78f89f9
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import org.apache.commons.collections.CollectionUtils;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -168,11 +169,8 @@ public RelatedPolicy findPolicy(LogicalRelation logicalRelation, CascadesContext

List<? extends RowFilterPolicy> policies = accessManager.evalRowFilterPolicies(
currentUserIdentity, ctlName, dbName, tableName);
if (policies.isEmpty()) {
return RelatedPolicy.NO_POLICY;
}
return new RelatedPolicy(
Optional.ofNullable(mergeRowPolicy(policies)),
Optional.ofNullable(CollectionUtils.isEmpty(policies) ? null : mergeRowPolicy(policies)),
hasDataMask ? Optional.of(dataMasks.build()) : Optional.empty()
);
}
Expand Down

0 comments on commit 78f89f9

Please sign in to comment.