@@ -26,6 +26,7 @@ of this software and associated documentation files (the "Software"), to deal
2626 */
2727package org .jenkinsci .plugins ;
2828
29+ import hudson .model .*;
2930import org .acegisecurity .Authentication ;
3031import org .jenkinsci .plugins .github_branch_source .GitHubSCMSource ;
3132import org .jenkinsci .plugins .workflow .job .WorkflowJob ;
@@ -41,10 +42,6 @@ of this software and associated documentation files (the "Software"), to deal
4142import edu .umd .cs .findbugs .annotations .NonNull ;
4243import edu .umd .cs .findbugs .annotations .Nullable ;
4344
44- import hudson .model .AbstractItem ;
45- import hudson .model .AbstractProject ;
46- import hudson .model .Describable ;
47- import hudson .model .Item ;
4845import hudson .plugins .git .GitSCM ;
4946import hudson .plugins .git .UserRemoteConfig ;
5047import hudson .security .ACL ;
@@ -254,10 +251,10 @@ private boolean checkReadPermission(@NonNull Permission permission) {
254251
255252 private boolean checkAgentUserPermission (@ NonNull Permission permission ) {
256253 String id = permission .getId ();
257- return (id .equals ("hudson.model. Hudson.Read" )
258- || id .equals ("hudson.model. Computer.Create" )
259- || id .equals ("hudson.model. Computer.Connect" )
260- || id .equals ("hudson.model. Computer.Configure" ));
254+ return (id .equals (Hudson .READ )
255+ || id .equals (Computer .CREATE )
256+ || id .equals (Computer .CONNECT )
257+ || id .equals (Computer .CONFIGURE ));
261258 }
262259
263260 private boolean checkJobStatusPermission (@ NonNull Permission permission ) {
0 commit comments