Skip to content

Commit

Permalink
Revert RangerPolicy model
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilbonte21 committed Jan 19, 2024
1 parent 831166f commit da11074
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ public class RangerPolicy extends RangerBaseModelObject implements java.io.Seria
private String zoneName;
private Boolean isDenyAllElse;
private Map<String, String> attributes;
private String policyFilterCriteria;
private String policyResourceCategory;

public RangerPolicy() {
this(null, null, null, null, null, null, null, null, null, null, null);
Expand Down Expand Up @@ -139,8 +137,6 @@ public RangerPolicy(String service, String name, String policyType, Integer poli
setZoneName(zoneName);
setConditions(conditions);
setIsDenyAllElse(isDenyAllElse);
setPolicyFilterCriteria(null);
setPolicyResourceCategory(null);

}

Expand Down Expand Up @@ -171,8 +167,6 @@ public void updateFrom(RangerPolicy other) {
setPolicyLabels(other.getPolicyLabels());
setZoneName(other.getZoneName());
setIsDenyAllElse(other.getIsDenyAllElse());
setPolicyFilterCriteria(other.getPolicyFilterCriteria());
setPolicyResourceCategory(other.getPolicyResourceCategory());
}

public Map<String, String> getAttributes() {
Expand Down Expand Up @@ -539,22 +533,6 @@ public void setIsDenyAllElse(Boolean isDenyAllElse) {
this.isDenyAllElse = isDenyAllElse == null ? Boolean.FALSE : isDenyAllElse;
}

public String getPolicyFilterCriteria() {
return policyFilterCriteria;
}

public void setPolicyFilterCriteria(String policyFilterCriteria) {
this.policyFilterCriteria = policyFilterCriteria;
}

public String getPolicyResourceCategory() {
return policyResourceCategory;
}

public void setPolicyResourceCategory(String policyResourceCategory) {
this.policyResourceCategory = policyResourceCategory;
}

@Override
public String toString( ) {
StringBuilder sb = new StringBuilder();
Expand Down Expand Up @@ -688,10 +666,6 @@ public StringBuilder toString(StringBuilder sb) {
}
sb.append(", zoneName=").append(zoneName);

sb.append(", policyFilterCriteria=").append(policyFilterCriteria);

sb.append(", policyResourceCategory=").append(policyResourceCategory);

sb.append(", isDenyAllElse={").append(isDenyAllElse).append("} ");

sb.append("}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ private RangerPolicy getRangerPolicy(AtlasEntityHeader atlasPolicy, String servi
policy.setCreatedBy(atlasPolicy.getCreatedBy());
policy.setCreateTime(atlasPolicy.getCreateTime());
policy.setIsEnabled(getIsPolicyEnabled(atlasPolicy));
policy.setPolicyResourceCategory(getPolicyResourceCategory(atlasPolicy));
//policy.setPolicyResourceCategory(getPolicyResourceCategory(atlasPolicy));

policy.setConditions(getPolicyConditions(atlasPolicy));
policy.setValiditySchedules(getPolicyValiditySchedule(atlasPolicy));
Expand All @@ -544,7 +544,7 @@ private RangerPolicy getRangerPolicy(AtlasEntityHeader atlasPolicy, String servi

if (POLICY_SERVICE_NAME_ABAC.equals(atlasPolicy.getAttribute(ATTR_POLICY_SERVICE_NAME))) {
String policyFilterCriteria = getPolicyFilterCriteria(atlasPolicy);
policy.setPolicyFilterCriteria(policyFilterCriteria);
//policy.setPolicyFilterCriteria(policyFilterCriteria);
}

return policy;
Expand Down

0 comments on commit da11074

Please sign in to comment.