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

Non-Admin users see "Replay" button with "Rebuild" as text label

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • rebuild-plugin
    • None
    • Jenkins 2.334

      Greetings, all. 

       

      We noticed an error with Jenkins 2.334 for non-admin users. After setting up permissions for Authenticated users to Build and replay jobs

       

      These users see a mismatch between the usual buttons/options in the left nav menu and their labels. After a non-admin logged in user checks a build results, they'll see the "Replay" option with "Rebuild" as a label, although the links are correct for each label.

       

       

      This only happens for non-admin users. Users with admin privileges are able to see the labels correctly

       

       

      For more details on plugins installed, see plugins-list.txt file attachment.

          [JENKINS-67770] Non-Admin users see "Replay" button with "Rebuild" as text label

          This seems to be by design. In the "Pipeline: Groovy" plugin, ReplayAction.getDisplayName() returns "Replay" if the user is authorized to edit the pipeline, or "Rebuild" if the user is only authorized to build the same pipeline again. Related to JENKINS-50855 and JENKINS-47339.

          However, it is unfortunate that the Rebuilder plugin uses the same "Rebuild" text for its button.

          Kalle Niemitalo added a comment - This seems to be by design. In the "Pipeline: Groovy" plugin, ReplayAction.getDisplayName() returns "Replay" if the user is authorized to edit the pipeline, or "Rebuild" if the user is only authorized to build the same pipeline again. Related to JENKINS-50855 and JENKINS-47339 . However, it is unfortunate that the Rebuilder plugin uses the same "Rebuild" text for its button.

          Jose Orsini added a comment -

          So basically, this is what requires an update/renaming, kon

          https://github.com/jenkinsci/rebuild-plugin/blob/rebuild-1.33/src/main/java/com/sonyericsson/rebuild/RebuildAction.java#L181

          What could be a more descriptive label for this button, based on the intended behavior of this action in Jenkins and that is not confusing on Jenkins' labels for the "Replay" button?

          Jose Orsini added a comment - So basically, this is what requires an update/renaming, kon https://github.com/jenkinsci/rebuild-plugin/blob/rebuild-1.33/src/main/java/com/sonyericsson/rebuild/RebuildAction.java#L181 What could be a more descriptive label for this button, based on the intended behavior of this action in Jenkins and that is not confusing on Jenkins' labels for the "Replay" button?

          For non-admin users, is there any difference in behavior between the two "Rebuild" buttons? If not, perhaps the Rebuilder plugin should detect this situation and omit its button.

          Kalle Niemitalo added a comment - For non-admin users, is there any difference in behavior between the two "Rebuild" buttons? If not, perhaps the Rebuilder plugin should detect this situation and omit its button.

          wangcheng cai added a comment - - edited

          ragesh_nair, kon We have the same issue which makes some difference between 'Rebuild' and 'Replay' button. In our pipeline, we need to find some info from upstream pipelines by searching for UpstreamCause. If a pipeline is triggered by 'Rebuild', there's UpstreamCause, while there's no UpstreamCause if the pipeline is actually triggered by 'Replay'.

          Our users without 'Replay' privilege are confused with the two 'Rebuild' buttons, and if they've chosen the wrong 'Rebuild'(de facto 'Replay'), the pipeline will fail due to no UpstreamCause is found.

          Though it's quite specific, but it shows the difference.

          wangcheng cai added a comment - - edited ragesh_nair , kon  We have the same issue which makes some difference between 'Rebuild' and 'Replay' button. In our pipeline, we need to find some info from upstream pipelines by searching for UpstreamCause. If a pipeline is triggered by 'Rebuild', there's UpstreamCause, while there's no UpstreamCause if the pipeline is actually triggered by 'Replay'. Our users without 'Replay' privilege are confused with the two 'Rebuild' buttons, and if they've chosen the wrong 'Rebuild'(de facto 'Replay'), the pipeline will fail due to no UpstreamCause is found. Though it's quite specific, but it shows the difference.

          Basil Crow added a comment -

          Basil Crow added a comment - First noted in jenkinsci/workflow-cps-plugin#424 (comment) .

            ragesh_nair ragesh_nair
            jorsini Jose Orsini
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: