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

!build abort works even if bot doesn't have cancel permissions

    Details

    • Similar Issues:

      Description

      Issuing the !build abort command works even if the bot doesn't have cancel permissions in Jenkins. The bot complains that it couldn't abort the build, but the abort still succeeds.

      This can be tested by giving the bot only read permissions.

      <Jephir> !build abort my_project
      <BuildBot> Jephir: couldn't abort my_project. I don't know why this happened.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/plugins/im/bot/AbortCommand.java
          src/main/java/hudson/plugins/im/bot/AbstractSingleJobCommand.java
          src/main/java/hudson/plugins/im/bot/CommentCommand.java
          http://jenkins-ci.org/commit/instant-messaging-plugin/5889fcc93a959a70b447cbaf4d504bf1edec8d34
          Log:
          Check permissions for abort and command commands [FIXED JENKINS-16232]

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/plugins/im/bot/AbortCommand.java src/main/java/hudson/plugins/im/bot/AbstractSingleJobCommand.java src/main/java/hudson/plugins/im/bot/CommentCommand.java http://jenkins-ci.org/commit/instant-messaging-plugin/5889fcc93a959a70b447cbaf4d504bf1edec8d34 Log: Check permissions for abort and command commands [FIXED JENKINS-16232]
          Hide
          kutzi kutzi added a comment -

          Thanks for pointing this out!

          Can you append the message where the bot complains that it couldn't abort the build? I couldn't see any permission checking there and wonder where this message comes from.

          Show
          kutzi kutzi added a comment - Thanks for pointing this out! Can you append the message where the bot complains that it couldn't abort the build? I couldn't see any permission checking there and wonder where this message comes from.
          Hide
          jephir jephir added a comment -

          This is the error message:

          <Jephir> !build abort my_project
          <BuildBot> Jephir: couldn't abort my_project. I don't know why this happened.

          The bot complains it couldn't abort, but looking in Jenkins, it had still succeeded in aborting the build even without cancel permissions.

          Show
          jephir jephir added a comment - This is the error message: <Jephir> !build abort my_project <BuildBot> Jephir: couldn't abort my_project. I don't know why this happened. The bot complains it couldn't abort, but looking in Jenkins, it had still succeeded in aborting the build even without cancel permissions.
          Hide
          kutzi kutzi added a comment -

          Thanks, that pointed me to another minor bug that the bug would always print this - regardless if the abort succeeded or not.

          Show
          kutzi kutzi added a comment - Thanks, that pointed me to another minor bug that the bug would always print this - regardless if the abort succeeded or not.

            People

            • Assignee:
              kutzi kutzi
              Reporter:
              jephir jephir
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: