*/
void setTemplateType (final String templateType);
+ /**
+ * Logout for administrator area. If a logged-in user instance exists, it is
+ * being logged-out, too.
+ * <p>
+ * @return Outcome (should be redirected)
+ */
+ String doAdminLogout ();
+
/**
* Logins the user, if the account is found, confirmed and unlocked.
* <p>
* @return Redirect target
*/
- String doLogin ();
+ String doUserLogin ();
+
+ /**
+ * Logout for current user by invalidating the current session.
+ * <p>
+ * @return Outcome (should be redirected)
+ */
+ String doUserLogout ();
/**
* Getter for logged-in user instance
* @return If current password matches
*/
boolean ifCurrentPasswordMatches ();
+
}
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+ lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ >
+
+ <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl">
+ <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_USER_LOGOUT}</ui:define>
+
+ <ui:define name="content_header">
+ #{msg.CONTENT_TITLE_LOGIN_USER_LOGOUT}
+ </ui:define>
+
+ <ui:define name="content">
+ <h:form id="user_logout" rendered="#{userLoginController.isUserLoggedIn()}">
+ <div class="table">
+ <div class="table_header">
+ <h:outputText value="#{msg.LOGIN_USER_LOGOUT_TITLE}" />
+ </div>
+
+ <div class="para">
+ <h:outputText value="#{msg.LOGIN_USER_LOGOUT_NOTICE}" />
+ </div>
+
+ <div class="table_footer">
+ <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+ <h:commandButton styleClass="submit" type="submit" action="#{userLoginController.doUserLogout()}" value="#{msg.BUTTON_USER_LOGOUT}" />
+ </div>
+ </div>
+ </h:form>
+
+ <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+ <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
+ </ui:fragment>
+ </ui:define>
+ </ui:composition>
+</html>