Skip to content

Commit

Permalink
RANGER-4767: Deleted policies are still taking effect if all policies…
Browse files Browse the repository at this point in the history
… for a security zone are deleted
  • Loading branch information
kulkabhay committed Apr 4, 2024
1 parent 785c563 commit 2d875da
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,13 @@ public void setPolicies(ServicePolicies policies) {
if (policies.getPolicies() == null) {
policies.setPolicies(new ArrayList<>());
}
if (MapUtils.isNotEmpty(policies.getSecurityZones())) {
for (ServicePolicies.SecurityZoneInfo element : policies.getSecurityZones().values()) {
if (element.getPolicies() == null) {
element.setPolicies(new ArrayList<>());
}
}
}
}
}
}
Expand Down

0 comments on commit 2d875da

Please sign in to comment.