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

Add Rebuild action for users who can Build but not Replay (was: Users with only Job/Configure shouldn't be able to replay jobs)

    XMLWordPrintable

    Details

    • Similar Issues:
    • Sprint:
      Pipeline - October, Pipeline - December

      Description

      As a Jenkins administrator, I would like for developers to be able to configure jobs, but only have certain users able to build those jobs. Through various means like RBAC and controlled agents, I have given jobs in a certain folder the ability to access agents and secrets. While I trust developers to configure those jobs, I have business requirements to only allow certain users to build those jobs.

      However, Jenkins allows users to Replay a build even if they don't have the Run/Replay or Job/Build permissions. This seems to due the fact that Run/Replay is implied by Job/Configure.

      Put another way, Job/Build isn't implied by Job/Configure, so why does Job/Configure imply Run/Replay? Instead, it seems like Run/Replay should only be implied if a user has both Job/Build and Job/Configure.

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -
            Show
            abayer Andrew Bayer added a comment - Downstream Blue Ocean PR up at https://github.com/jenkinsci/blueocean-plugin/pull/1536
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/cps/replay/ReplayAction.java
            src/main/resources/org/jenkinsci/plugins/workflow/cps/replay/Messages.properties
            src/main/resources/org/jenkinsci/plugins/workflow/cps/replay/ReplayAction/index.jelly
            src/test/java/org/jenkinsci/plugins/workflow/cps/replay/ReplayActionTest.java
            http://jenkins-ci.org/commit/workflow-cps-plugin/bf938edf4a2b24cbd175e118acce1a22dc4acd49
            Log:
            [FIXED JENKINS-47339] Add build-implied REBUILD permission.

            Allows rebuilding a Pipeline run with the exact same script.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/org/jenkinsci/plugins/workflow/cps/replay/ReplayAction.java src/main/resources/org/jenkinsci/plugins/workflow/cps/replay/Messages.properties src/main/resources/org/jenkinsci/plugins/workflow/cps/replay/ReplayAction/index.jelly src/test/java/org/jenkinsci/plugins/workflow/cps/replay/ReplayActionTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/bf938edf4a2b24cbd175e118acce1a22dc4acd49 Log: [FIXED JENKINS-47339] Add build-implied REBUILD permission. Allows rebuilding a Pipeline run with the exact same script.
            Hide
            abayer Andrew Bayer added a comment -

            Releasing workflow-cps 1.42 with this fix, updating the Blue Ocean PR accordingly. This should be marked resolved once it's merged in Blue Ocean.

            Show
            abayer Andrew Bayer added a comment - Releasing workflow-cps 1.42 with this fix, updating the Blue Ocean PR accordingly. This should be marked resolved once it's merged in Blue Ocean.
            Hide
            jamesdumay James Dumay added a comment -

            nice one Andrew Bayer

            Show
            jamesdumay James Dumay added a comment - nice one Andrew Bayer
            Hide
            jglick Jesse Glick added a comment -

            Looks like ReplayPipelineCommand was forgotten here, so the CLI does not support the new option.

            Show
            jglick Jesse Glick added a comment - Looks like ReplayPipelineCommand was forgotten here, so the CLI does not support the new option.

              People

              Assignee:
              abayer Andrew Bayer
              Reporter:
              jamesdumay James Dumay
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: