Skip to content

Commit

Permalink
Fix comment - Craig
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Aug 25, 2023
1 parent 7f2fc19 commit 3c76151
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void accept(RestChannel channel) throws Exception {

final String service = (String) requestBody.getOrDefault("service", DEFAULT_SERVICE);
final User user = threadPool.getThreadContext().getTransient(ConfigConstants.OPENDISTRO_SECURITY_USER);
Set<String> mappedRoles = mapRoles(user, /*Do not include host based mappings*/ null);
Set<String> mappedRoles = mapRoles(user);

builder.startObject();
builder.field("user", user.getName());
Expand Down Expand Up @@ -173,8 +173,8 @@ public void accept(RestChannel channel) throws Exception {
};
}

public Set<String> mapRoles(final User user, final TransportAddress caller) {
return this.configModel.mapSecurityRoles(user, caller);
private Set<String> mapRoles(final User user) {
return this.configModel.mapSecurityRoles(user, null);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public String createJwt(
Integer expirySeconds,
List<String> roles,
List<String> backendRoles,
Boolean roleSecurityMode
boolean roleSecurityMode
) throws Exception {
final long nowAsMillis = timeProvider.getAsLong();
final Instant nowAsInstant = Instant.ofEpochMilli(timeProvider.getAsLong());
Expand Down

0 comments on commit 3c76151

Please sign in to comment.