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

Build Pipeline Plugin views are not filtered

    Details

    • Similar Issues:

      Description

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

        Attachments

          Issue Links

            Activity

            Hide
            j3p0uk 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();
                }
            
            Show
            j3p0uk 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(); }
            Hide
            siemfabio Fabio Bazzani added a comment -

            Any news about about this improvement?

            Show
            siemfabio Fabio Bazzani added a comment - Any news about about this improvement?

              People

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

                Dates

                • Created:
                  Updated: