Skip to content

Commit

Permalink
No longer expose CheckTable
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Bandener <[email protected]>
  • Loading branch information
nibix committed Jun 28, 2024
1 parent 31c20ae commit f653945
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ public PrivilegesEvaluatorResponse evaluate(PrivilegesEvaluationContext context)
action0,
mappedRoles
);
log.info("Index to privilege matrix:\n{}", presponse.getCheckTable());
log.info("Index to privilege matrix:\n{}", presponse.getPrivilegeMatrix());
}

return presponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class PrivilegesEvaluatorResponse {
CreateIndexRequestBuilder createIndexRequestBuilder;
private Set<String> onlyAllowedForIndices = ImmutableSet.of();
private CheckTable<String, String> indexToActionCheckTable;
private String privilegeMatrix;
private String reason;

/**
Expand Down Expand Up @@ -77,8 +78,14 @@ public PrivilegesEvaluatorResponse reason(String reason) {
return this;
}

public CheckTable<String, String> getCheckTable() {
return indexToActionCheckTable;
public String getPrivilegeMatrix() {
String result = this.privilegeMatrix;

if (result == null) {
result = this.indexToActionCheckTable.toTableString("ok", "MISSING");
this.privilegeMatrix = result;
}
return result;
}

public Set<String> getMissingSecurityRoles() {
Expand Down

0 comments on commit f653945

Please sign in to comment.