Skip to content

Commit fc513f0

Browse files
committed
Fix milestone and add logging
1 parent 0899757 commit fc513f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,12 +534,15 @@ public synchronized void load() {
534534
save();
535535
}
536536
// only call on subsequent load to avoid cycle
537-
if (Jenkins.get().getInitLevel().compareTo(InitMilestone.COMPLETED) > 0) {
537+
if (Jenkins.get().getInitLevel() == InitMilestone.COMPLETED) {
538538
try {
539+
LOG.log(Level.FINE, "Reconfiguring ScriptApproval after loading configuration from disk");
539540
reconfigure();
540541
} catch (IOException e) {
541542
LOG.log(Level.WARNING, e, () -> "Failed to reconfigure ScriptApproval");
542543
}
544+
} else {
545+
LOG.log(Level.FINE, "Skipping reconfiguration of ScriptApproval during Jenkins startup sequence");
543546
}
544547
}
545548

0 commit comments

Comments
 (0)