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

Hide build executor history widget if user lacks job configuration permission

      If the user lacks the "Job/Configure" permissions, the job config history widget is displayed in the build executor widget nevertheless:

      It would make more sense to display the icon only, if the user has job configuration permissions.

          [JENKINS-68742] Hide build executor history widget if user lacks job configuration permission

          Ross Douglas added a comment -

          Hi, I'm not sure what you mean. They should still be able to view the build history and access build logs in a read capacity, right?

          What parts of the widget do you want removed for users without "Job/Configure" permissions?

          Regards

          Ross Douglas added a comment - Hi, I'm not sure what you mean. They should still be able to view the build history and access build logs in a read capacity, right? What parts of the widget do you want removed for users without "Job/Configure" permissions? Regards

          Satish added a comment -

          if I understand correctly, this feature will show the job config history only if user has the job config permission.
          IMO, This is good feature , enabling only the permitted users to view history.

          I would like to work on this issue.

          Satish added a comment - if I understand correctly, this feature will show the job config history only if user has the job config permission. IMO, This is good feature , enabling only the permitted users to view history. I would like to work on this issue.

          Arnab added a comment -

          Hello notmyfault is the config setup option a required step (can't skip) where we choose the option for the "Show Build Badges" by selecting any of never, always, etc. Because I saw "always" as the hardcoded default value for the "showBuildBadges" variable. Maybe if we change it to "userWithConfigPermission" then I guess our issue would be solved since as per your description user's with config permission can only see the badge. 

          Then when it we call the "showBuildBadges" function it will not just from the first "if" statement matching the default condition as "always" and we can have our expected behavior. I'll be raising a PR soon.

          Arnab added a comment - Hello notmyfault is the config setup option a required step (can't skip) where we choose the option for the "Show Build Badges" by selecting any of never, always, etc. Because I saw "always" as the hardcoded default value for the "showBuildBadges" variable. Maybe if we change it to "userWithConfigPermission" then I guess our issue would be solved since as per your description user's with config permission can only see the badge.  Then when it we call the "showBuildBadges" function it will not just from the first "if" statement matching the default condition as "always" and we can have our expected behavior. I'll be raising a PR soon.

          Arnab added a comment -

          Fixed - https://github.com/jenkinsci/job-config-history-plugin/pull/352

          So, I'm marking this as resolved

          Arnab added a comment - Fixed - https://github.com/jenkinsci/job-config-history-plugin/pull/352 So, I'm marking this as resolved

          Arnab added a comment -

          Arnab added a comment - Fixed in - https://github.com/jenkinsci/job-config-history-plugin/pull/352

            code_arnab Arnab
            notmyfault Alexander Brandes
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: