• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • build-pipeline-plugin
    • None

      The "Build Pipeline Plugin" (https://wiki.jenkins-ci.org/display/JENKINS/Build+Pipeline+Plugin) shows each pipeline as a view. It would be great if this views were filtered by the "Role Strategy Plugin" (https://wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin) when the user has no right for any job in the pipeline.

      Currently, the user sees the pipeline view which shows an empty page (because he/she has no rights for any of the jobs).

          [JENKINS-16748] Build Pipeline Plugin views are not filtered

          From my reading of this: https://github.com/jenkinsci/jenkins/commit/85e13303f8cfbebeb7dab347fda8ccf4069070b6 (from https://issues.jenkins-ci.org/browse/JENKINS-3681)

          The getItems() call must not be returning an empty collection for a user that does not have permissions on the jobs used in the pipeline, and the getItems() call for a build pipeline view is (https://github.com/jenkinsci/build-pipeline-plugin/blob/master/src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java)

              @Override
              public Collection<TopLevelItem> getItems() {
                  return Hudson.getInstance().getItems();
              }
          

          Jenkins internals aren't my strongest skills, but I wonder would the following change help with this?

          Change BuildPipelineView.getItems() to:

              @Override
              public Collection<TopLevelItem> getItems() {
                  return this.gridBuilder.getFirstJob(this).getItems();
              }
          

          Jon-Paul Sullivan added a comment - From my reading of this: https://github.com/jenkinsci/jenkins/commit/85e13303f8cfbebeb7dab347fda8ccf4069070b6 (from https://issues.jenkins-ci.org/browse/JENKINS-3681 ) The getItems() call must not be returning an empty collection for a user that does not have permissions on the jobs used in the pipeline, and the getItems() call for a build pipeline view is ( https://github.com/jenkinsci/build-pipeline-plugin/blob/master/src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java ) @Override public Collection<TopLevelItem> getItems() { return Hudson.getInstance().getItems(); } Jenkins internals aren't my strongest skills, but I wonder would the following change help with this? Change BuildPipelineView.getItems() to: @Override public Collection<TopLevelItem> getItems() { return this .gridBuilder.getFirstJob( this ).getItems(); }

          siemfabio added a comment -

          Any news about about this improvement?

          siemfabio added a comment - Any news about about this improvement?

            danielpetisme Daniel Petisme
            derkoe Christian Köberl
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: