]> source.dussan.org Git - gitblit.git/commitdiff
Do not display My Tickets link if ticket service is not ready
authorJames Moger <james.moger@gitblit.com>
Thu, 24 Apr 2014 18:05:36 +0000 (14:05 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 1 May 2014 20:14:15 +0000 (16:14 -0400)
src/main/java/com/gitblit/wicket/pages/RootPage.java

index a4d2353d0e815c5806e79c275a4d9ae3c31260ae..fb68208f026241ac88fdf2e994f25f3f117946f0 100644 (file)
@@ -172,13 +172,12 @@ public abstract class RootPage extends BasePage {
                if (!authenticateView || (authenticateView && isLoggedIn)) {\r
                        pages.add(new PageRegistration(isLoggedIn ? "gb.myDashboard" : "gb.dashboard", MyDashboardPage.class,\r
                                        getRootPageParameters()));\r
+                       if (isLoggedIn && app().tickets().isReady()) {\r
+                               pages.add(new PageRegistration("gb.mytickets", MyTicketsPage.class));\r
+                       }\r
                        pages.add(new PageRegistration("gb.repositories", RepositoriesPage.class,\r
                                        getRootPageParameters()));\r
                        pages.add(new PageRegistration("gb.activity", ActivityPage.class, getRootPageParameters()));\r
-                       if(isLoggedIn)\r
-                       {\r
-                               pages.add(new PageRegistration("gb.mytickets", MyTicketsPage.class, getRootPageParameters()));\r
-                       }\r
                        if (allowLucene) {\r
                                pages.add(new PageRegistration("gb.search", LuceneSearchPage.class));\r
                        }\r