Skip to content

Commit

Permalink
Renames action0 to actions
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Jul 7, 2023
1 parent a21c4c0 commit 6c5ee8e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public boolean isInitialized() {
return configModel != null && configModel.getSecurityRoles() != null && dcm != null;
}

public PrivilegesEvaluatorResponse evaluate(final User user, Set<String> action0) {
public PrivilegesEvaluatorResponse evaluate(final User user, Set<String> actions) {

if (!isInitialized()) {
throw new OpenSearchSecurityException("OpenSearch Security is not initialized.");
Expand All @@ -94,11 +94,11 @@ public PrivilegesEvaluatorResponse evaluate(final User user, Set<String> action0
final boolean isDebugEnabled = log.isDebugEnabled();
if (isDebugEnabled) {
log.debug("Evaluate permissions for {} on {}", user, clusterService.localNode().getName());
log.debug("Action: {}", action0);
log.debug("Action: {}", actions);
log.debug("Mapped roles: {}", mappedRoles.toString());
}

for (String action : action0) {
for (String action : actions) {
if (!securityRoles.impliesClusterPermissionPermission(action)) {
presponse.missingPrivileges.add(action);
presponse.allowed = false;
Expand All @@ -111,7 +111,7 @@ public PrivilegesEvaluatorResponse evaluate(final User user, Set<String> action0
);
} else {
if (isDebugEnabled) {
log.debug("Allowed because we have permissions for {}", action0);
log.debug("Allowed because we have permissions for {}", actions);
}
presponse.allowed = true;

Expand Down

0 comments on commit 6c5ee8e

Please sign in to comment.