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

Matrix-based security -Job cancel privilege not working

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • matrix-auth-plugin
    • None

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

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

          [JENKINS-15464] Matrix-based security -Job cancel privilege not working

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

          vijayabharath m added a comment - I have attached the console output of a sample job & privileges of the user.

          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.

          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.

          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.

          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.

          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.

          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.

          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.

          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 .

          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

          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

          Roman80 added a comment -

          Any progress?

          Roman80 added a comment - Any progress?

          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.

          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.

          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.

          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.

          Daniel Beck added a comment -

          The UI issue duplicates JENKINS-32506.

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

          Daniel Beck added a comment - The UI issue duplicates JENKINS-32506 . The underlying unexpected implication issue is tracked as JENKINS-14713 .

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

              Created:
              Updated:
              Resolved: