boolean authenticateView = app().settings().getBoolean(Keys.web.authenticateViewPages, false);\r
boolean authenticateAdmin = app().settings().getBoolean(Keys.web.authenticateAdminPages, true);\r
boolean allowAdmin = app().settings().getBoolean(Keys.web.allowAdministration, true);\r
+ boolean allowLucene = app().settings().getBoolean(Keys.web.allowLuceneIndexing, true);\r
+ boolean isLoggedIn = GitBlitWebSession.get().isLoggedIn();\r
\r
if (authenticateAdmin) {\r
showAdmin = allowAdmin && GitBlitWebSession.get().canAdmin();\r
}\r
\r
if (authenticateView || authenticateAdmin) {\r
- if (GitBlitWebSession.get().isLoggedIn()) {\r
+ if (isLoggedIn) {\r
UserMenu userFragment = new UserMenu("userPanel", "userMenuFragment", RootPage.this);\r
add(userFragment);\r
} else {\r
\r
// navigation links\r
List<PageRegistration> pages = new ArrayList<PageRegistration>();\r
- if (!authenticateView || (authenticateView && GitBlitWebSession.get().isLoggedIn())) {\r
- pages.add(new PageRegistration(GitBlitWebSession.get().isLoggedIn() ? "gb.myDashboard" : "gb.dashboard", MyDashboardPage.class,\r
+ if (!authenticateView || (authenticateView && isLoggedIn)) {\r
+ pages.add(new PageRegistration(isLoggedIn ? "gb.myDashboard" : "gb.dashboard", MyDashboardPage.class,\r
getRootPageParameters()));\r
pages.add(new PageRegistration("gb.repositories", RepositoriesPage.class,\r
getRootPageParameters()));\r
pages.add(new PageRegistration("gb.activity", ActivityPage.class, getRootPageParameters()));\r
- pages.add(new PageRegistration("gb.mytickets", MyTicketsPage.class, getRootPageParameters()));\r
- if (app().settings().getBoolean(Keys.web.allowLuceneIndexing, true)) {\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
if (showAdmin) {\r
pages.add(new PageRegistration("gb.federation", FederationPage.class));\r
}\r
\r
- if (!authenticateView || (authenticateView && GitBlitWebSession.get().isLoggedIn())) {\r
+ if (!authenticateView || (authenticateView && isLoggedIn)) {\r
addDropDownMenus(pages);\r
}\r
}\r