Skip to content

Commit

Permalink
Remove calls to isPluginUser
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Nov 14, 2024
1 parent fdf7256 commit c25e1ab
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ PrivilegesEvaluatorResponse providesPrivilege(PrivilegesEvaluationContext contex
}

// 4: If plugin is performing the action, check if plugin has permission
if (context.getUser().isPluginUser()) {
if (this.usersToActionMatcher.containsKey(context.getUser().getName())) {
WildcardMatcher matcher = this.usersToActionMatcher.get(context.getUser().getName());
if (matcher != null && matcher.test(action)) {
return PrivilegesEvaluatorResponse.ok();
Expand Down Expand Up @@ -519,7 +519,7 @@ PrivilegesEvaluatorResponse providesAnyPrivilege(PrivilegesEvaluationContext con
}

// 4: If plugin is performing the action, check if plugin has permission
if (context.getUser().isPluginUser()) {
if (this.usersToActionMatcher.containsKey(context.getUser().getName())) {
WildcardMatcher matcher = this.usersToActionMatcher.get(context.getUser().getName());
for (String action : actions) {
if (matcher != null && matcher.test(action)) {
Expand Down

0 comments on commit c25e1ab

Please sign in to comment.