Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28845

Rebuild not respecting permissions like manualTrigger does

    Details

    • Similar Issues:

      Description

      in pipe.js

      if (data.allowManualTriggers && task.manual && task.manualStep.enabled && task.manualStep.permission) {
                                  html.push('<div class="task-manual" id="manual-' + id + '" onclick="triggerManual(\'' + id + '\', \'' + task.id + '\', \'' + task.manualStep.upstreamProject + '\', \'' + task.manualStep.upstreamId + '\');">');
                                  html.push("</div>");
                              } else {
                                  if (!pipeline.aggregated && data.allowRebuild && task.rebuildable) {
                                      html.push('<div class="task-rebuild" id="rebuild-' + id + '" onclick="triggerRebuild(\'' + id + '\', \'' + task.id + '\', \'' + task.buildId + '\');">');
                                      html.push("</div>");
                                  }
                              }
      

      Rebuildable tasks don't check permissions until after they are submitted. I believe you should just be able to add "&& task.manualStep.permission" to the end of the if statement on line 168.

        Attachments

          Activity

            People

            • Assignee:
              patbos Patrik Boström
              Reporter:
              nnordrum Noah Nordrum
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: