File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed
src/main/java/io/jenkins/plugins/pipelinegraphview/utils Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,11 @@ public boolean isBuildable() {
4040 }
4141
4242 public Permission getPermission () {
43- return run . getParent () .BUILD ;
43+ return Item .BUILD ;
4444 }
4545
4646 public Permission getConfigurePermission () {
47- return run . getParent () .CONFIGURE ;
47+ return Item .CONFIGURE ;
4848 }
4949
5050 public String getBuildDisplayName () {
@@ -57,18 +57,11 @@ public String getBuildDisplayName() {
5757 @ RequirePOST
5858 @ JavaScriptMethod
5959 public boolean doRebuild () throws IOException , ExecutionException {
60- if (run != null ) {
61- run .checkAnyPermission (Item .BUILD );
62- ReplayAction replayAction = run .getAction (ReplayAction .class );
63- Queue .Item item =
64- replayAction .run2 (replayAction .getOriginalScript (), replayAction .getOriginalLoadedScripts ());
65-
66- if (item == null ) {
67- return false ;
68- }
69- return true ;
70- }
71- return false ;
60+ run .checkPermission (getPermission ());
61+ ReplayAction replayAction = run .getAction (ReplayAction .class );
62+ Queue .Item item = replayAction .run2 (replayAction .getOriginalScript (), replayAction .getOriginalLoadedScripts ());
63+
64+ return item != null ;
7265 }
7366
7467 public String getFullBuildDisplayName () {
You can’t perform that action at this time.
0 commit comments