Skip to content

Commit 2af05b0

Browse files
authored
Merge pull request #194 from mawinter69/JENKINS-63413
[JENKINS-63413] fix running as user on node
2 parents 13f908e + 661f7d9 commit 2af05b0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/com/michelin/cio/hudson/plugins/rolestrategy/RoleBasedAuthorizationStrategy.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import hudson.model.Hudson;
4646
import hudson.model.Item;
4747
import hudson.model.Job;
48+
import hudson.model.Node;
4849
import hudson.model.Run;
4950
import hudson.model.User;
5051
import hudson.model.View;
@@ -181,10 +182,11 @@ public ACL getACL(@NonNull AbstractItem project) {
181182
.newInheritingACL(getRootACL());
182183
}
183184

185+
184186
@Override
185187
@NonNull
186-
public ACL getACL(@NonNull Computer computer) {
187-
return agentRoles.newMatchingRoleMap(computer.getName()).getACL(RoleType.Slave, computer)
188+
public ACL getACL(@NonNull Node node) {
189+
return agentRoles.newMatchingRoleMap(node.getNodeName()).getACL(RoleType.Slave, node)
188190
.newInheritingACL(getRootACL());
189191
}
190192

0 commit comments

Comments
 (0)