Skip to content

Commit

Permalink
Merge pull request #494 from basil/acegi
Browse files Browse the repository at this point in the history
Migrate from Acegi compatibility layer to Spring Security
  • Loading branch information
jglick authored Dec 20, 2024
2 parents e4d5eca + e67aa5b commit 8de56dc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
import jenkins.model.queue.AsynchronousExecution;
import jenkins.scm.RunWithSCM;
import jenkins.util.Timer;
import org.acegisecurity.Authentication;
import org.jenkinsci.plugins.workflow.FilePathUtils;
import org.jenkinsci.plugins.workflow.actions.TimingAction;
import org.jenkinsci.plugins.workflow.flow.BlockableResume;
Expand Down Expand Up @@ -132,6 +131,7 @@
import org.kohsuke.stapler.WebMethod;
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.interceptor.RequirePOST;
import org.springframework.security.core.Authentication;

@SuppressWarnings("SynchronizeOnNonFinalField")
@SuppressFBWarnings(value={"RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN"},
Expand Down Expand Up @@ -289,10 +289,10 @@ public WorkflowRun(WorkflowJob job, File dir) throws IOException {
charset = "UTF-8"; // cannot override getCharset, and various Run methods do not call it anyway
BuildListener myListener = getListener();
myListener.started(getCauses());
Authentication auth = Jenkins.getAuthentication();
if (!auth.equals(ACL.SYSTEM)) {
Authentication auth = Jenkins.getAuthentication2();
if (!auth.equals(ACL.SYSTEM2)) {
String name = auth.getName();
if (!auth.equals(Jenkins.ANONYMOUS)) {
if (!auth.equals(Jenkins.ANONYMOUS2)) {

Check warning on line 295 in src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 295 is only partially covered, one branch is missing
User user = User.getById(name, false);
if (user != null) {
name = ModelHyperlinkNote.encodeTo(user);
Expand Down

0 comments on commit 8de56dc

Please sign in to comment.