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

Use jenkins-cli to get console of a project requires user has Job/Build permission

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • cli
    • Jenkins ver. 2.107.3 on 4.1.12-112.14.13.el6uek.x86_64

      I have user emreporter which doesn't have build permission for job "EM Ops - OMS - MIGDC2 EM OMS Patch (Real Run)" but can read the build history of the job. So, from Jenkins UI, the user can check the job execution history and go into a execution for example #16 to get its information in console.

      However, when I am using CLI to get the console for latest job execution result, it reported error about the user is missing build permission.

      That is to say, the behavior of CLI is not same to UI.

      Here is the command result:
      + java -jar jenkins-cli.jar -s
      http://MyJenkinsServer:8080
      -http -auth emreporter:******** console 'EM Ops - OMS - MIGDC2 EM OMS Patch (Real Run)' -f

      ERROR: emreporter is missing the Job/Build permission
       

      Please see attached screenshot for the comparison result on both UI and CLI.

          [JENKINS-52181] Use jenkins-cli to get console of a project requires user has Job/Build permission

          Eric Yu created issue -
          Oleg Nenashev made changes -
          Labels Original: cli jenkins New: cli jenkins newbie-friendly
          Eric Yu made changes -
          Assignee New: Eric Yu [ ericyu2018 ]
          Eric Yu made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Oleg Nenashev made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Mark Waite made changes -
          Released As New: https://github.com/jenkinsci/jenkins/releases/tag/jenkins-2.140
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Closed [ 6 ]

            ericyu2018 Eric Yu
            ericyu2018 Eric Yu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: