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

Tag/label should allow TAG permission

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      To tag a build currently requires users to have the ADMINISTER permission. This should be expanded to allow or replaced with the TAG permission.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/java/hudson/plugins/perforce/PerforceTagAction.java
          http://jenkins-ci.org/commit/perforce-plugin/22059241130e67b142e5026416bdc7465d51a004
          Log:
          [FIXED JENKINS-13736] tagging now only requires the TAG permission

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/java/hudson/plugins/perforce/PerforceTagAction.java http://jenkins-ci.org/commit/perforce-plugin/22059241130e67b142e5026416bdc7465d51a004 Log: [FIXED JENKINS-13736] tagging now only requires the TAG permission
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_perforce #225
          [FIXED JENKINS-13736] tagging now only requires the TAG permission (Revision 22059241130e67b142e5026416bdc7465d51a004)

          Result = SUCCESS
          Rob Petti :
          Files :

          • src/main/java/hudson/plugins/perforce/PerforceTagAction.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_perforce #225 [FIXED JENKINS-13736] tagging now only requires the TAG permission (Revision 22059241130e67b142e5026416bdc7465d51a004) Result = SUCCESS Rob Petti : Files : src/main/java/hudson/plugins/perforce/PerforceTagAction.java
          Hide
          schwallers Steve Schwaller added a comment -

          Shouldn't the permission check in the getIconFileName() function be updated also so that the "Label this Build" option appears when users have the TAG permission?

          if (tag == null && !getACL().hasPermission(getPermission()))

          Show
          schwallers Steve Schwaller added a comment - Shouldn't the permission check in the getIconFileName() function be updated also so that the "Label this Build" option appears when users have the TAG permission? if (tag == null && !getACL().hasPermission(getPermission()))
          Hide
          rpetti Rob Petti added a comment -

          I'm not sure. I figured that jenkins would internally check the result of getPermission() before displaying it. If we did check for it in getIconFileName, wouldn't that only hide the icon and not the actual option?

          Show
          rpetti Rob Petti added a comment - I'm not sure. I figured that jenkins would internally check the result of getPermission() before displaying it. If we did check for it in getIconFileName, wouldn't that only hide the icon and not the actual option?
          Hide
          schwallers Steve Schwaller added a comment -

          My testing, and what started this, is that unless the user had ADMINISTER privilege it wasn't in the task list.
          Looking at the jenkins docs it looks like if you return null will hide it from the task list.
          http://javadoc.jenkins-ci.org/hudson/model/Action.html#getIconFileName()

          Changing the permission to my last comment will display it if they have TAG and hide it if they don't.

          Show
          schwallers Steve Schwaller added a comment - My testing, and what started this, is that unless the user had ADMINISTER privilege it wasn't in the task list. Looking at the jenkins docs it looks like if you return null will hide it from the task list. http://javadoc.jenkins-ci.org/hudson/model/Action.html#getIconFileName( ) Changing the permission to my last comment will display it if they have TAG and hide it if they don't.
          Hide
          rpetti Rob Petti added a comment -

          Ok, I've just made that change, though I dropped the 'tag == null' bit because it really shouldn't be there anymore.

          Show
          rpetti Rob Petti added a comment - Ok, I've just made that change, though I dropped the 'tag == null' bit because it really shouldn't be there anymore.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/java/hudson/plugins/perforce/PerforceTagAction.java
          http://jenkins-ci.org/commit/perforce-plugin/8e57d86fb1457e69bdb6e58e35e45772352dad29
          Log:
          [FIXED JENKINS-13736] fixing getIconFileName for tagging

          the icon should display whenever the user has permission, since we can have multiple tags

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/java/hudson/plugins/perforce/PerforceTagAction.java http://jenkins-ci.org/commit/perforce-plugin/8e57d86fb1457e69bdb6e58e35e45772352dad29 Log: [FIXED JENKINS-13736] fixing getIconFileName for tagging the icon should display whenever the user has permission, since we can have multiple tags
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_perforce #227
          [FIXED JENKINS-13736] fixing getIconFileName for tagging (Revision 8e57d86fb1457e69bdb6e58e35e45772352dad29)

          Result = SUCCESS
          Rob Petti :
          Files :

          • src/main/java/hudson/plugins/perforce/PerforceTagAction.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_perforce #227 [FIXED JENKINS-13736] fixing getIconFileName for tagging (Revision 8e57d86fb1457e69bdb6e58e35e45772352dad29) Result = SUCCESS Rob Petti : Files : src/main/java/hudson/plugins/perforce/PerforceTagAction.java

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              schwallers Steve Schwaller
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: