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

Cancel permission is granted for users having build permission

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • Jenkins 1.465

      I expected that people need to have the "Cancel" permission to be able to cancel a build. That's right, unless they have the "Build" permission.
      I would like to be able to give "build" permission to some people without allowing them to abort a build. What do you think of it?

          [JENKINS-14713] Cancel permission is granted for users having build permission

          drautureau created issue -
          Hangsu Ma made changes -
          Assignee New: Hangsu Ma [ hangsu ]

          Hangsu Ma added a comment -

          The script in the link below will explicit grant Cancel permission to user with Build permission. So the configuration will be compatible after this change.
          https://wiki.jenkins-ci.org/x/fAAhB

          Hangsu Ma added a comment - The script in the link below will explicit grant Cancel permission to user with Build permission. So the configuration will be compatible after this change. https://wiki.jenkins-ci.org/x/fAAhB

          Hangsu Ma added a comment -

          Hangsu Ma added a comment - code change in jenkins can be find here: https://github.com/hangsuma/jenkins/commit/1d0be0016bc498810579d8494c87bbd2922893b3
          Hangsu Ma made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Hangsu Ma added a comment -

          Hangsu Ma added a comment - pull request here: https://github.com/jenkinsci/jenkins/pull/882

          Shannon Kerr added a comment -

          Can users have permission to cancel their own builds but not the builds of others? This is what I thought +Build and -Cancel permissions would do, but that's not the case.

          When I gave a user build permission, I see users can cancel not just their own, but they can cancel any build they want.

          I think it should be that If I grant someone "cancel" permission, they could cancel any build for the system or for the project since we use per-project permissions. When I haven't given them cancel permission, I'm not sure why they can cancel the build of anyone.

          Shannon Kerr added a comment - Can users have permission to cancel their own builds but not the builds of others? This is what I thought +Build and -Cancel permissions would do, but that's not the case. When I gave a user build permission, I see users can cancel not just their own, but they can cancel any build they want. I think it should be that If I grant someone "cancel" permission, they could cancel any build for the system or for the project since we use per-project permissions. When I haven't given them cancel permission, I'm not sure why they can cancel the build of anyone.

          Kohsuke, can you comment on the original design goal of the build/cancel permission relationship?

          Walter Kacynski added a comment - Kohsuke, can you comment on the original design goal of the build/cancel permission relationship?
          Walter Kacynski made changes -
          Assignee Original: Hangsu Ma [ hangsu ] New: Kohsuke Kawaguchi [ kohsuke ]

          Csaba Gyorfi added a comment -

          Hello,

          I am using Jenkins v1.519 where this correction should be included already. But: I can not remove the cancel permission for the users. Even if I check out the check box "Cancel" at Project-Based security matrix, users can cancel jobs.
          Is this a new error or related to this issue?
          Background: we use clearcase and snapshot views. Updating a snapshot view can take about 15-20 mins. If a user cancels a job during the update phase, the update process itself will not be stopped, and a second job can not be started or queued. Therefore I decided to remove the cancel permission completely (even for own jobs), but it has no effect.

          Csaba Gyorfi added a comment - Hello, I am using Jenkins v1.519 where this correction should be included already. But: I can not remove the cancel permission for the users. Even if I check out the check box "Cancel" at Project-Based security matrix, users can cancel jobs. Is this a new error or related to this issue? Background: we use clearcase and snapshot views. Updating a snapshot view can take about 15-20 mins. If a user cancels a job during the update phase, the update process itself will not be stopped, and a second job can not be started or queued. Therefore I decided to remove the cancel permission completely (even for own jobs), but it has no effect.

            Unassigned Unassigned
            drautureau drautureau
            Votes:
            31 Vote for this issue
            Watchers:
            34 Start watching this issue

              Created:
              Updated:
              Resolved: