Skip to content

Commit fc00869

Browse files
AndreBrinkopscurvydoggo
authored andcommitted
Fix permission type in checkAgentUserPermission function
1 parent ead3f3f commit fc00869

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/org/jenkinsci/plugins/GithubRequireOrganizationMembershipACL.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,10 @@ private boolean checkReadPermission(@NonNull Permission permission) {
250250
}
251251

252252
private boolean checkAgentUserPermission(@NonNull Permission permission) {
253-
String id = permission.getId();
254-
return (id.equals(Hudson.READ)
255-
|| id.equals(Computer.CREATE)
256-
|| id.equals(Computer.CONNECT)
257-
|| id.equals(Computer.CONFIGURE));
253+
return permission.equals(Hudson.READ)
254+
|| permission.equals(Computer.CREATE)
255+
|| permission.equals(Computer.CONNECT)
256+
|| permission.equals(Computer.CONFIGURE);
258257
}
259258

260259
private boolean checkJobStatusPermission(@NonNull Permission permission) {

0 commit comments

Comments
 (0)