• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • p4-plugin
    • None

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

          [JENKINS-13736] Tag/label should allow TAG permission

          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

          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

          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

          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

          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()))

          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()))

          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?

          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?

          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.

          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.

          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.

          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.

          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

          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

          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

          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

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

              Created:
              Updated:
              Resolved: