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

Matrix-based security -Job cancel privilege not working

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If cancel privilege not granted also,users able to cancel building job.

        Attachments

        1. CancelBuild.jpg
          CancelBuild.jpg
          51 kB
        2. consoleOutput.png
          consoleOutput.png
          87 kB
        3. privilege.png
          privilege.png
          29 kB

          Issue Links

            Activity

            vijayabharathm vijayabharath m created issue -
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            There's no permission in Jenkins that represents "privilege to cancel a build", so I'm not sure which permission you are referring to.

            If you disagree, please reopen the ticket and attach the screenshots of the matrix configuration UI, so that we can verify where it came from.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - There's no permission in Jenkins that represents "privilege to cancel a build", so I'm not sure which permission you are referring to. If you disagree, please reopen the ticket and attach the screenshots of the matrix configuration UI, so that we can verify where it came from.
            kohsuke Kohsuke Kawaguchi made changes -
            Field Original Value New Value
            Assignee Kohsuke Kawaguchi [ kohsuke ]
            Resolution Cannot Reproduce [ 5 ]
            Status Open [ 1 ] Resolved [ 5 ]
            Hide
            jvogel Jan Vogel added a comment -

            Same issue here, I've attached the screenshot, including the hover text. I've cleared both role names.

            Show
            jvogel Jan Vogel added a comment - Same issue here, I've attached the screenshot, including the hover text. I've cleared both role names.
            jvogel Jan Vogel made changes -
            Attachment CancelBuild.jpg [ 22715 ]
            Hide
            jvogel Jan Vogel added a comment -

            I've experienced the same issue as the original report. Found this page when looking for a solution, so I've taken the liberty to attach the requested screenshot.

            Show
            jvogel Jan Vogel added a comment - I've experienced the same issue as the original report. Found this page when looking for a solution, so I've taken the liberty to attach the requested screenshot.
            jvogel Jan Vogel made changes -
            Resolution Cannot Reproduce [ 5 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            Hide
            vijayabharathm vijayabharath m added a comment -

            I have attached the console output of a sample job & privileges of the user.

            Show
            vijayabharathm vijayabharath m added a comment - I have attached the console output of a sample job & privileges of the user.
            vijayabharathm vijayabharath m made changes -
            Attachment consoleOutput.png [ 22718 ]
            Attachment privilege.png [ 22719 ]
            Hide
            vijayabharathm vijayabharath m added a comment -

            I created a job and ran it. I didn't given Cancel privilege to the testuser. Even though testuser cancelled that job.
            Please refer the screen shots which I added here.

            Show
            vijayabharathm vijayabharath m added a comment - I created a job and ran it. I didn't given Cancel privilege to the testuser. Even though testuser cancelled that job. Please refer the screen shots which I added here.
            Hide
            adham_hassan Adham Hassan added a comment -

            I'm experiencing this issue as well. I have a subversion checkout, and I'd like to let users start a build if they just committed code and don't want to wait for the next SVN polling. However if they cancel the build in the middle of the SVN update, it screws up the entire source tree, and I then have to choose to wipe the work space to fix it. Otherwise all builds after that fail in an SVN error.

            Show
            adham_hassan Adham Hassan added a comment - I'm experiencing this issue as well. I have a subversion checkout, and I'd like to let users start a build if they just committed code and don't want to wait for the next SVN polling. However if they cancel the build in the middle of the SVN update, it screws up the entire source tree, and I then have to choose to wipe the work space to fix it. Otherwise all builds after that fail in an SVN error.
            Hide
            mmlegra Matt Legrand added a comment - - edited

            We too are having this issue. The above screen shots capture it well. If 'cancel' is not possible, the checkbox should be removed.

            Show
            mmlegra Matt Legrand added a comment - - edited We too are having this issue. The above screen shots capture it well. If 'cancel' is not possible, the checkbox should be removed.
            Hide
            danielbeck Daniel Beck added a comment -

            This is just a UI issue. Like 'Administer' implies all other privileges (except those optional ones set on the command line), so does 'Build' imply 'Cancel'.

            The underlying cause is JENKINS-14713.

            Show
            danielbeck Daniel Beck added a comment - This is just a UI issue. Like 'Administer' implies all other privileges (except those optional ones set on the command line), so does 'Build' imply 'Cancel'. The underlying cause is JENKINS-14713 .
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-14713 [ JENKINS-14713 ]
            olivergondza Oliver Gond┼ża made changes -
            Component/s matrix-auth [ 18131 ]
            Component/s matrix [ 15501 ]
            Hide
            roman80 Roman80 added a comment -

            What is the current status of this issue?

            I think it is in general a good idea that the user which triggers a build could cancel his own job but are not allowed to cancel jobs from other users expect the user has the "cancel" flag or is an admin

            Show
            roman80 Roman80 added a comment - What is the current status of this issue? I think it is in general a good idea that the user which triggers a build could cancel his own job but are not allowed to cancel jobs from other users expect the user has the "cancel" flag or is an admin
            Hide
            roman80 Roman80 added a comment -

            Any progress?

            Show
            roman80 Roman80 added a comment - Any progress?
            Hide
            h0riz0n Brent Goodacre added a comment - - edited

            Throwing in my 2 cents here.

            Our automation jobs don't currently handle cancellation well. Currently a proper solution won't be made for the short or medium term, so I've tried to disable cancel permissions for all but 1 group who have been trained to perform all required cleanup after cancelling a job.

            Your plugin does indeed have a "Cancel" permission under the "Jobs" group. Not granting that permission seems to remove the ability to cancel jobs from the queue and slave sidebars on Jenkins, but alternative cancel buttons can still be found when clicking into the jobs themselves.

            So it looks like you're restricting the cancellation of jobs, but not in all places.

            Show
            h0riz0n Brent Goodacre added a comment - - edited Throwing in my 2 cents here. Our automation jobs don't currently handle cancellation well. Currently a proper solution won't be made for the short or medium term, so I've tried to disable cancel permissions for all but 1 group who have been trained to perform all required cleanup after cancelling a job. Your plugin does indeed have a "Cancel" permission under the "Jobs" group. Not granting that permission seems to remove the ability to cancel jobs from the queue and slave sidebars on Jenkins, but alternative cancel buttons can still be found when clicking into the jobs themselves. So it looks like you're restricting the cancellation of jobs, but not in all places.
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 146220 ] JNJira + In-Review [ 186086 ]
            Hide
            nify Nico Falk added a comment -

            Any news on this topic?
            I need to prevent special jobs from being canceled. A cancel shall not be possible even for the user which has started the job. Only the administrator shall have the permission to do that.
            Especially using the ClearCase plugin as SCM source will damage the ClearCase view irreparable if the build is canceled during SCM step.

            Show
            nify Nico Falk added a comment - Any news on this topic? I need to prevent special jobs from being canceled. A cancel shall not be possible even for the user which has started the job. Only the administrator shall have the permission to do that. Especially using the ClearCase plugin as SCM source will damage the ClearCase view irreparable if the build is canceled during SCM step.
            Hide
            danielbeck Daniel Beck added a comment -

            The UI issue duplicates JENKINS-32506.

            The underlying unexpected implication issue is tracked as JENKINS-14713.

            Show
            danielbeck Daniel Beck added a comment - The UI issue duplicates JENKINS-32506 . The underlying unexpected implication issue is tracked as JENKINS-14713 .
            danielbeck Daniel Beck made changes -
            Resolution Duplicate [ 3 ]
            Status Reopened [ 4 ] Resolved [ 5 ]

              People

              Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              vijayabharathm vijayabharath m
              Votes:
              10 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: