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