- that the user must change password enforced by administrator may be not wanted everywhere, so better make it as a feature that can be disabled per project
- ignored some strings for i18n
Signed-off-by: Roland Häder <roland@haeder.net>
/**
* Path name for guest base template
*/
- private static final String GUEST_BASE_TEMPLATE_NAME = "guest/guest";
+ private static final String GUEST_BASE_TEMPLATE_NAME = "guest/guest"; //NOI18N
/**
* Path name for logged-in user base template
*/
- private static final String USER_BASE_TEMPLATE_NAME = "login/user/user";
+ private static final String USER_BASE_TEMPLATE_NAME = "login/user/user"; //NOI18N
/**
* Serial number
<div class="clear"></div>
</div>
- <div class="table_row">
- <div class="table_left_medium">
- <h:outputLabel for="userMustChangePassword" value="#{msg.ADMIN_USER_MUST_CHANGE_PASSWORD}" />
- </div>
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_must_change_password')}">
+ <div class="table_row">
+ <div class="table_left_medium">
+ <h:outputLabel for="userMustChangePassword" value="#{msg.ADMIN_USER_MUST_CHANGE_PASSWORD}" />
+ </div>
- <div class="table_right_medium">
- <h:selectBooleanCheckbox styleClass="input" id="userMustChangePassword" value="#{adminUserController.userMustChangePassword}" />
- </div>
+ <div class="table_right_medium">
+ <h:selectBooleanCheckbox styleClass="input" id="userMustChangePassword" value="#{adminUserController.userMustChangePassword}" />
+ </div>
- <div class="clear"></div>
- </div>
+ <div class="clear"></div>
+ </div>
+ </ui:fragment>
<div class="para notice">
<ul>
<param-name>is_feature_privacy_enabled</param-name>
<param-value>true</param-value>
</context-param>
+ <context-param>
+ <description>Feature: Users must change password after login (with current password). Administrators can enforce this.</description>
+ <param-name>is_feature_user_must_change_password_enabled</param-name>
+ <param-value>true</param-value>
+ </context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and not userLoginController.ifUserMustChangePassword()}">
+ <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
<div class="table">
<div class="table_header">
<h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" />
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and not userLoginController.ifUserMustChangePassword()}">
+ <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
<div class="table">
<div class="table_header">
<h:outputText value="#{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}" />
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and not userLoginController.ifUserMustChangePassword()}">
+ <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
<ui:include src="/WEB-INF/templates/generic/message_box.tpl">
<ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
</ui:include>
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and not userLoginController.ifUserMustChangePassword()}">
+ <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
<div class="table">
<div class="table_header">
<h:outputText value="#{msg.LOGIN_EDIT_USER_DATA_TITLE}" />
<div class="para">
<ul>
- <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data') and not userLoginController.ifUserMustChangePassword()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
<li>
<h:link title="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA_TITLE}" outcome="login_change_personal_data" value="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA}" />
</li>
</ui:fragment>
- <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data') and not userLoginController.ifUserMustChangePassword()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
<li>
<h:link title="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" outcome="login_change_email_address" value="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS}" />
</li>
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and not userLoginController.ifUserMustChangePassword()}">
+ <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
Here goes your content.
</ui:fragment>
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and not userLoginController.ifUserMustChangePassword()}">
+ <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}">
<ui:include src="/WEB-INF/templates/generic/message_box.tpl">
<ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
</ui:include>