Skip to content

Commit

Permalink
Remove the un-used logic of cluster action check
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Oct 28, 2023
1 parent 1dc296b commit 1c8fafe
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,7 @@ public PrivilegesEvaluatorResponse evaluate(
namedXContentRegistry
);

final boolean serviceAccountUser = user.isServiceAccount();
if (isClusterPerm(action0)) {
if (serviceAccountUser) {
presponse.missingPrivileges.add(action0);
presponse.allowed = false;
log.info("{} is a service account which has no access to cluster level permission of {}.", user, action0);
return presponse;
}

if (!securityRoles.impliesClusterPermissionPermission(action0)) {
presponse.missingPrivileges.add(action0);
presponse.allowed = false;
Expand Down

0 comments on commit 1c8fafe

Please sign in to comment.