diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 6e36007578c0de655d69a83dd17fe11cd9555bf8..462342f0a598f485e4f233224fa5da99a9a68310 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -690,9 +690,13 @@ public abstract class AbstractProject

,R extends A /** * Marks the build as disabled. + * The method will ignore the disable command if {@link #supportsMakeDisabled()} + * returns false. The enable command will be executed in any case. + * @param b true - disable, false - enable */ public void makeDisabled(boolean b) throws IOException { if(disabled==b) return; // noop + if (b && !supportsMakeDisabled()) return; // do nothing if the disabling is unsupported this.disabled = b; if(b) Jenkins.getInstance().getQueue().cancel(this);