| | |
| | | import com.gitblit.wicket.GitBlitWebSession; |
| | | import com.gitblit.wicket.SessionlessForm; |
| | | import com.gitblit.wicket.WicketUtils; |
| | | import com.gitblit.wicket.panels.GravatarImage; |
| | | import com.gitblit.wicket.panels.AvatarImage; |
| | | import com.gitblit.wicket.panels.LinkPanel; |
| | | import com.gitblit.wicket.panels.NavigationPanel; |
| | | |
| | |
| | | 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 displayUserPanel = app().settings().getBoolean(Keys.web.displayUserPanel, true); |
| | | boolean isLoggedIn = GitBlitWebSession.get().isLoggedIn(); |
| | | |
| | | if (authenticateAdmin) { |
| | |
| | | } |
| | | } |
| | | |
| | | if (authenticateView || authenticateAdmin) { |
| | | if (displayUserPanel && (authenticateView || authenticateAdmin)) { |
| | | if (isLoggedIn) { |
| | | UserMenu userFragment = new UserMenu("userPanel", "userMenuFragment", RootPage.this); |
| | | add(userFragment); |
| | |
| | | boolean standardLogin = authenticationType.isStandard(); |
| | | |
| | | if (app().settings().getBoolean(Keys.web.allowGravatar, true)) { |
| | | add(new GravatarImage("username", user, "navbarGravatar", 20, false)); |
| | | add(new AvatarImage("username", user, "navbarGravatar", 20, false)); |
| | | } else { |
| | | add(new Label("username", user.getDisplayName())); |
| | | } |