| | |
| | | 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; |
| | | |
| | |
| | | |
| | | request = ((WebRequest) getRequest()).getHttpServletRequest(); |
| | | response = ((WebResponse) getResponse()).getHttpServletResponse(); |
| | | request.getSession().setAttribute(Constants.AUTHENTICATION_TYPE, AuthenticationType.CREDENTIALS); |
| | | request.getSession().setAttribute(Constants.ATTRIB_AUTHTYPE, AuthenticationType.CREDENTIALS); |
| | | |
| | | // Set Cookie |
| | | app().authentication().setCookie(request, response, user); |
| | |
| | | UserModel user = session.getUser(); |
| | | boolean editCredentials = app().authentication().supportsCredentialChanges(user); |
| | | HttpServletRequest request = ((WebRequest) getRequest()).getHttpServletRequest(); |
| | | AuthenticationType authenticationType = (AuthenticationType) request.getSession().getAttribute(Constants.AUTHENTICATION_TYPE); |
| | | boolean standardLogin = authenticationType.isStandard(); |
| | | AuthenticationType authenticationType = (AuthenticationType) request.getAttribute(Constants.ATTRIB_AUTHTYPE); |
| | | boolean standardLogin = (null != authenticationType) ? authenticationType.isStandard() : true; |
| | | |
| | | 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())); |
| | | } |