Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Acegi compatibility layer to Spring Security #494

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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
Loading