Skip to content

Commit

Permalink
[JENKINS-32353] - Update Authorize Project integration to a Pipeline-…
Browse files Browse the repository at this point in the history
…compatible version
  • Loading branch information
oleg-nenashev committed Sep 15, 2016
1 parent 0c8e5e6 commit d404e86
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 d404e86

Please sign in to comment.