• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      I'd like the ability to hide tabs that have no visible jobs. We use Project
      Based Security to limit development access to only their projects. I don't like
      that developers can still see all tabs used by the other groups, even though
      they are empty due to the security settings.

          [JENKINS-3681] Hide Empty Tabs (Views) in the GUI

          rnell created issue -

          rnell added a comment -

          In Hudson a Tab is known as a View.

          rnell added a comment - In Hudson a Tab is known as a View.

          Alan Harder added a comment -
              • Issue 4893 has been marked as a duplicate of this issue. ***

          Alan Harder added a comment - Issue 4893 has been marked as a duplicate of this issue. ***
          Alan Harder made changes -
          Link New: This issue is duplicated by JENKINS-4893 [ JENKINS-4893 ]

          Alan Harder added a comment -
              • Issue 3945 has been marked as a duplicate of this issue. ***

          Alan Harder added a comment - Issue 3945 has been marked as a duplicate of this issue. ***
          Alan Harder made changes -
          Link New: This issue is duplicated by JENKINS-3945 [ JENKINS-3945 ]

          Alan Harder added a comment -

          I've closed 2 requests for setting view permissions in favor of this request..
          use the project permissions to control what can be seen, and the UI should just
          hide those view tabs where the current user can't see any of the projects.
          We'll need to figure out when to show a tab even when empty though.. maybe
          admins always see all views, or anyone who can edit a view always sees it.. that
          way someone can find the view to add projects or delete it.

          Alan Harder added a comment - I've closed 2 requests for setting view permissions in favor of this request.. use the project permissions to control what can be seen, and the UI should just hide those view tabs where the current user can't see any of the projects. We'll need to figure out when to show a tab even when empty though.. maybe admins always see all views, or anyone who can edit a view always sees it.. that way someone can find the view to add projects or delete it.

          Alan Harder added a comment -

          This works by simply wrapping each <l:tab> inside this condition in View/main.jelly:
          <j:if test="${v==it or v.hasPermission(v.CONFIGURE) or !empty(v.items)}">

          however, this calls View.getItems() on every view every time a view page is shown. should there be a short-term cache to avoid recomputation?

          Alan Harder added a comment - This works by simply wrapping each <l:tab> inside this condition in View/main.jelly: <j:if test="${v==it or v.hasPermission(v.CONFIGURE) or !empty(v.items)}"> however, this calls View.getItems() on every view every time a view page is shown. should there be a short-term cache to avoid recomputation?

          infinitodev added a comment -

          Any update on this issue?

          infinitodev added a comment - Any update on this issue?

          saheba added a comment - - edited

          Same problem here. We would like to reduce the size of the view tab bar and use project-based security as well. Anything new regarding this issue?

          saheba added a comment - - edited Same problem here. We would like to reduce the size of the view tab bar and use project-based security as well. Anything new regarding this issue?

            Unassigned Unassigned
            rnell rnell
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: