From: James Moger Date: Thu, 24 Apr 2014 18:05:36 +0000 (-0400) Subject: Do not display My Tickets link if ticket service is not ready X-Git-Tag: v1.6.0~98^2~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6f9908aa9ebcdfbb32e8305b157be177071abe56;p=gitblit.git Do not display My Tickets link if ticket service is not ready --- diff --git a/src/main/java/com/gitblit/wicket/pages/RootPage.java b/src/main/java/com/gitblit/wicket/pages/RootPage.java index a4d2353d..fb68208f 100644 --- a/src/main/java/com/gitblit/wicket/pages/RootPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RootPage.java @@ -172,13 +172,12 @@ public abstract class RootPage extends BasePage { if (!authenticateView || (authenticateView && isLoggedIn)) { pages.add(new PageRegistration(isLoggedIn ? "gb.myDashboard" : "gb.dashboard", MyDashboardPage.class, getRootPageParameters())); + if (isLoggedIn && app().tickets().isReady()) { + pages.add(new PageRegistration("gb.mytickets", MyTicketsPage.class)); + } pages.add(new PageRegistration("gb.repositories", RepositoriesPage.class, getRootPageParameters())); pages.add(new PageRegistration("gb.activity", ActivityPage.class, getRootPageParameters())); - if(isLoggedIn) - { - pages.add(new PageRegistration("gb.mytickets", MyTicketsPage.class, getRootPageParameters())); - } if (allowLucene) { pages.add(new PageRegistration("gb.search", LuceneSearchPage.class)); }