Skip to content

Commit

Permalink
Merge pull request #54 from oleg-nenashev/bug/JENKINS-32353-authorize…
Browse files Browse the repository at this point in the history
…-project-pipeline

[JENKINS-32353] - Update Authorize Project integration to a Pipeline-compatible version
  • Loading branch information
oleg-nenashev committed Sep 18, 2016
2 parents 0c8e5e6 + d404e86 commit 61a66a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -82,7 +82,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>authorize-project</artifactId>
<version>1.0.2</version>
<version>1.1.0</version>
<optional>true</optional>
<type>jar</type>
</dependency>
Expand Down
Expand Up @@ -29,6 +29,7 @@
import com.synopsys.arc.jenkins.plugins.ownership.jobs.JobOwnerHelper;
import hudson.Extension;
import hudson.model.AbstractProject;
import hudson.model.Job;
import hudson.model.Queue;
import hudson.model.User;
import java.util.Collections;
Expand All @@ -53,8 +54,8 @@ public OwnershipAuthorizeProjectStrategy() {
}

@Override
public Authentication authenticate(AbstractProject<?, ?> ap, Queue.Item item) {
OwnershipDescription d = JobOwnerHelper.Instance.getOwnershipDescription(ap);
public Authentication authenticate(Job<?, ?> job, Queue.Item item) {
OwnershipDescription d = JobOwnerHelper.Instance.getOwnershipDescription(job);
if (!d.hasPrimaryOwner()) { // fallback to anonymous
return Jenkins.ANONYMOUS;
}
Expand Down

0 comments on commit 61a66a4

Please sign in to comment.