Commit 4f036c5a by Tuomas Riihimäki

Add logout button to template. ( was lost in previous loginbox-fix)

1 parent e383c0b0
......@@ -149,6 +149,10 @@
<h:outputText value="#{i18n['template.loggedInAs']}" />
<br />
<b><h:outputText value="#{sessionHandler.currentUser.nick}" /></b>
<br />
<h:link outcome="/auth/logout">
<h:outputText value="#{i18n['login.logout']}" />
</h:link>
</ui:fragment>
<ui:fragment rendered="#{!sessionHandler.loggedIn}">
<div style="text-align: left; padding: 0.7em;">
......
......@@ -56,10 +56,9 @@ public class AuthView extends GenericCDIView {
req.getSession().invalidate();
navihandler.forward("/frontpage");
navihandler.forward("/frontpage?faces-redirect=true");
}
public String doLogout() {
HttpServletRequest req = getRequest();
if (permbean.isLoggedIn()) {
......@@ -82,7 +81,7 @@ public class AuthView extends GenericCDIView {
}
public void executeLogin(String onError) {
if(onError == null)
if (onError == null)
onError = "/auth/loginError";
doLogin(onError);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!