]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued a bit: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Mon, 1 Aug 2016 15:57:56 +0000 (17:57 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 7 Aug 2016 10:00:24 +0000 (12:00 +0200)
- basicly added (unfinished) setting flag "user must change password"

Signed-off-by: Roland Häder <roland@haeder.net>
Signed-off-by: Roland Häder <roland@mxchange.org>
13 files changed:
src/java/org/mxchange/jjobs/beans/login/JobsUserLoginWebSessionBean.java
src/java/org/mxchange/jjobs/beans/login/JobsUserLoginWebSessionController.java
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/admin/user/admin_form_user_data.tpl
web/user/login_change_email_address.xhtml
web/user/login_change_personal_data.xhtml
web/user/login_contact_data_saved.xhtml
web/user/login_edit_user_data.xhtml
web/user/login_index.xhtml
web/user/login_user_data_saved.xhtml

index 13841f66b02646736a43a1eeb7f60073b84e3526..31a76019d22ce9fa71009e4270e79dcecb0104ea 100644 (file)
@@ -189,8 +189,8 @@ public class JobsUserLoginWebSessionBean extends BaseJobsController implements J
        }
 
        @Override
-       public boolean isGuest () {
-               return (!this.isUserLoggedIn());
+       public boolean ifUserMustChangePassword () {
+               return (this.isUserLoggedIn() && this.getLoggedInUser().getUserMustChangePassword());
        }
 
        @Override
@@ -215,7 +215,6 @@ public class JobsUserLoginWebSessionBean extends BaseJobsController implements J
 
                // Trace message
                // NOISY-DEBUG System.out.println(MessageFormat.format("JobsUserLoginWebSessionBean:isUserLoggedIn: this.userLoggedIn={0} - EXIT!", this.userLoggedIn));
-
                // Return it
                return this.userLoggedIn;
        }
index a173490909d65fd828b2d2b38013750de16f28f8..5c21a2230ae0ac4223dd57d95f6c32d82a9c78d6 100644 (file)
@@ -69,11 +69,11 @@ public interface JobsUserLoginWebSessionController extends Serializable {
        boolean isUserLoggedIn ();
 
        /**
-        * Is this truly a guest?
+        * Checks whether the user needs to change password
         * <p>
-        * @return Whether the user is truly a guest
+        * @return Whether the user needs to change password
         */
-       boolean isGuest ();
+       boolean ifUserMustChangePassword ();
 
        /**
         * Whether the currently logged-in user is invisible
@@ -97,8 +97,8 @@ public interface JobsUserLoginWebSessionController extends Serializable {
        String getCurrentPassword ();
 
        /**
-        * Checks whether the (previously entered) current password matches with from
-        * the user instance.
+        * Checks whether the (previously entered) current password matches with
+        * from the user instance.
         * <p>
         * @return If current password matches
         */
index ae6f6ca42a42b7383eac4a3add6f0b33e5e9f141..0917b12e68572ebf27d353df13d01df9f25c6886 100644 (file)
@@ -101,6 +101,11 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
        @Inject
        private JobsUserWebSessionController userController;
 
+       /**
+        * Flag whether user must change password after login
+        */
+       private Boolean userMustChangePassword;
+
        /**
         * User name
         */
@@ -366,6 +371,16 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
                this.userName = userName;
        }
 
+       @Override
+       public Boolean getUserMustChangePassword () {
+               return this.userMustChangePassword;
+       }
+
+       @Override
+       public void setUserMustChangePassword (final Boolean userMustChangePassword) {
+               this.userMustChangePassword = userMustChangePassword;
+       }
+
        @Override
        public String getUserPassword () {
                return this.userPassword;
index a968ae85e270742d0c6565d0455fc7e0d1da1503..3b3195d9c996eb8bf604fd93698bd8b6e8e604b0 100644 (file)
@@ -91,4 +91,18 @@ public interface JobsAdminUserWebRequestController extends Serializable {
         */
        void setUserPasswordRepeat (final String userPasswordRepeat);
 
+       /**
+        * Getter for flag if user needs to change password
+        * <p>
+        * @return Flag if user needs to change password
+        */
+       Boolean getUserMustChangePassword ();
+
+       /**
+        * Setter for flag if user needs to change password
+        * <p>
+        * @param userMustChangePassword Flag if user needs to change password
+        */
+       void setUserMustChangePassword (final Boolean userMustChangePassword);
+
 }
index f6067e3921e8f08c6e4bf621815dc400b0145b42..98c0f14f113f8e8b56832bddd47c5771a78877d5 100644 (file)
@@ -561,3 +561,24 @@ GUEST_USER_RESEND_LINK_COMPLETED=Es ist ein neuer Best\u00e4tigungslink an Ihre
 GUEST_USER_NO_ACCOUNT_YET_QUESTION=Noch kein Benutzerkonto?
 LINK_GUEST_USER_NO_ACCOUNT_YET_TITLE=Als Benutzer anmelden
 LINK_GUEST_USER_NO_ACCOUNT_YET=Einfach hier anmelden.
+ERROR_GUEST_REGISTRATION_DISABLED=Fehler: Die Anmeldung ist administrativ deaktiviert worden.
+ERROR_LOGIN_USER_EDIT_DATA_DISABLED=Fehler: Editieren von Benutzerdaten wurde administrativ deaktiviert.
+LINK_USER_LOGOUT=Ausloggen
+LINK_USER_LOGOUT_TITLE=Aus dem Mitgliedsbereich ausloggen.
+ERROR_GUEST_USER_RESEND_LINK_DEACTIVATED=Fehler: Erneutes Aussenden des Best\u00e4tigungslink wurde administrativ deaktiviert.
+PAGE_TITLE_LOGIN_USER_LOGOUT=Ausloggen aus dem Benutzerbereich
+CONTENT_TITLE_LOGIN_USER_LOGOUT=Aus dem Benutzerbereich ausloggen:
+LOGIN_USER_LOGOUT_TITLE=Aus Benutzerbereich ausloggen?
+LOGIN_USER_LOGOUT_NOTICE=M\u00f6chten Sie sich aus dem Benutzerbereich ausloggen? Dies sollten Sie immer an einem Rechner tun, den auch andere nutzen (z.B. Internetcafe).
+BUTTON_USER_LOGOUT=Ausloggen
+ADMIN_CONTACT_HOUSE_NUMBER_EXTENSION=Hausnummererweiterung:
+ADMIN_PERSONAL_DATA_HOUSE_NUMBER_EXTENSION=Hausnummererweiterung:
+PERSONAL_DATA_HOUSE_NUMBER_EXTENSION=Anhang:
+ERROR_PARAMETER_FILE_TYPE_NOT_SET=Fehler: Parameter 'fileType' nicht gesetzt.
+ADMIN_COUNTRY_PHONE_CODE_REQUIRED=Bitte geben Sie die Vorwahl dieses Landes ein (z.B. 49 f\u00fcr Deutschland).
+ADMIN_COUNTRY_EXTERNAL_DIAL_PREFIX_REQUIRED=Bitte geben Sie die Vorwahl f\u00fcr Gespr\u00e4che ausserhalb des Ortes ein (meistens 0).
+ADMIN_COUNTRY_I18N_KEY_REQUIRED=Bitte geben Sie den Schl\u00fcssel f\u00fcr das Sprachpaket ein (z.B. COUNTRY_GERMANY f\u00fcr Deutschland).
+ADMIN_COUNTRY_CODE_REQUIRED=Bitte geben Sie den L\u00e4ndercode ein (z.B. DE f\u00fcr Deutschland).
+ADMIN_COUNTRY_ABORAD_DIAL_PREFIX_REQUIRED=Bitte geben Sie die Vorwahl f\u00fcr Auslandsgespr\u00e4che ein (z.B. + oder 00).
+ADMIN_MOBILE_PROVIDER_DIAL_PREFIX_REQUIRED=Bitte geben Sie die Vorwahl ohne f\u00fchrende Null f\u00fcr den Mobilfunkanbieter ein (z.B. 177 f\u00fcr E+).
+USER_LOGIN_MUST_CHANGE_PASSWORD=Sie m\u00fcssen Ihr Passwort \u00e4ndern. Dies darf nicht mit dem aktuellen \u00fcbereinstimmen.
index b0088281054271b8efbbdea2da9a5cea465e1877..131c63109f75f0c18c355cf6dbce18ebe9019e86 100644 (file)
@@ -513,7 +513,6 @@ ADMIN_CONTACT_FAX_NUMBER=Fax number:
 PAGE_TITLE_ADMIN_EXPORT_CONTACT=Export contact data
 CONTENT_TITLE_ADMIN_EXPORT_CONTACT=Export contact data:
 ADMIN_EXPORT_CONTACTS_TITLE=Start data export
-#Bei sehr gro\u00dfen Datenmengen kann es eventuell zu Zeit\u00fcberschreitungen kommen. Daher sollten Sie besser seitenweise exportieren.
 ADMIN_EXPORT_CONTACTS_TIMEOUT_WARNING=Big data amount may lead to timeouts. You should then try to export each page separately.
 BUTTON_ADMIN_EXPORT_CONTACTS_CSV=Export all data as CSV file
 BUTTON_ADMIN_EXPORT_CONTACTS_XLS=Export all data as Excel file
@@ -562,3 +561,24 @@ GUEST_USER_RESEND_LINK_COMPLETED=A new confirmation link has been sent out to yo
 GUEST_USER_NO_ACCOUNT_YET_QUESTION=Not yet registered as user?
 LINK_GUEST_USER_NO_ACCOUNT_YET_TITLE=Register as a user
 LINK_GUEST_USER_NO_ACCOUNT_YET=Signup here quickly.
+ERROR_GUEST_REGISTRATION_DISABLED=Error: Registration has been administratively deactivated.
+ERROR_LOGIN_USER_EDIT_DATA_DISABLED=Error: Editing of user data has been disabled by administrators.
+LINK_USER_LOGOUT=Logout
+LINK_USER_LOGOUT_TITLE=Logout from user area.
+ERROR_GUEST_USER_RESEND_LINK_DEACTIVATED=Error: Sending out confirmation link has been deactivated.
+PAGE_TITLE_LOGIN_USER_LOGOUT=Logout from user area
+CONTENT_TITLE_LOGIN_USER_LOGOUT=Logout from user area:
+LOGIN_USER_LOGOUT_TITLE=Logout from user area?
+LOGIN_USER_LOGOUT_NOTICE=Do you want to logout from user area? You should always do this when you share the same computer with others (e.g. Internet cafe).
+BUTTON_USER_LOGOUT=Logout
+ADMIN_CONTACT_HOUSE_NUMBER_EXTENSION=House number extension:
+ADMIN_PERSONAL_DATA_HOUSE_NUMBER_EXTENSION=House number extension:
+PERSONAL_DATA_HOUSE_NUMBER_EXTENSION=Extension:
+ERROR_PARAMETER_FILE_TYPE_NOT_SET=Error: Parameter 'fileType' is not set.
+ADMIN_COUNTRY_PHONE_CODE_REQUIRED=Please enter dial prefix for this country (e.g. 1 for U.S.A.).
+ADMIN_COUNTRY_EXTERNAL_DIAL_PREFIX_REQUIRED=Please enter dial prefix for calls outside the current city.
+ADMIN_COUNTRY_I18N_KEY_REQUIRED=Please enter the key for the language package (e.g. COUNTRY_USA for U.S.A.).
+ADMIN_COUNTRY_CODE_REQUIRED=Please enter country code (e.g. US for U.S.A.).
+ADMIN_COUNTRY_ABORAD_DIAL_PREFIX_REQUIRED=Please enter dial prefix for abroad calls (e.g. + or 00).
+ADMIN_MOBILE_PROVIDER_DIAL_PREFIX_REQUIRED=Please enter dial prefix for mobile provider.
+USER_LOGIN_MUST_CHANGE_PASSWORD=Please change your password. It must not match with your current one.
index 511af3b08f105b28e8483d537088641b38754c22..e8b209de9ea57b8278a4552c39b5a5bd88148b13 100644 (file)
                                        <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>
+
+                                       <div class="table_right_medium">
+                                               <h:selectBooleanCheckbox styleClass="input" id="userMustChangePassword" value="#{adminUserController.userMustChangePassword}" />
+                                       </div>
+
+                                       <div class="clear"></div>
+                               </div>
+
                                <div class="para notice">
                                        <ul>
                                                <li>
index c8d47e9d149a81329e969dcfc8ad8ab60c5f0988..3fb7ca98c028f37026ec50a1334ab5e777500853 100644 (file)
@@ -15,7 +15,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and not userLoginController.ifUserMustChangePassword()}">
                                <div class="table">
                                        <div class="table_header">
                                                <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" />
                                </div>
                        </ui:fragment>
 
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
+
+                       <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}">
+                               <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" />
+                       </ui:fragment>
+
                        <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
                                <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
                        </ui:fragment>
index b184daae45afcaf429dce241ae9ec4cfe0aaafac..fb3781ac266b28e0ab3258c2337be3f26c5f94f8 100644 (file)
@@ -2,10 +2,10 @@
 <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"
-         >
+       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_CHANGE_PERSONAL_DATA}</ui:define>
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and not userLoginController.ifUserMustChangePassword()}">
                                <div class="table">
                                        <div class="table_header">
-                                               #{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}
+                                               <h:outputText value="#{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}" />
                                        </div>
 
                                        <h:form id="login_change_personal_form">
                                                </div>
                                        </h:form>
                                </div>
+                               <<<<<<< HEAD
+                               =======
+                       </ui:fragment>
+
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
+
+                       <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}">
+                               <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" />
+                               >>>>>>> be1ec6b... Continued a bit: (please cherry-pick)
                        </ui:fragment>
 
                        <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
index 262f86eff66e52a0fae74ffc27bc04c756de69fd..bc8b42e9096b882f1308a8d088c7f84dd9d1b9ae 100644 (file)
@@ -2,10 +2,10 @@
 <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"
-         >
+       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_CONTACT_DATA_SAVED}</ui:define>
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and not userLoginController.ifUserMustChangePassword()}">
                                <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
                                        <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
                                </ui:include>
                        </ui:fragment>
 
+                       <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}">
+                               <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" />
+                       </ui:fragment>
+
                        <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
                                <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
                        </ui:fragment>
index 0d6c0fc1d9166e9b1d8625929e798cba2b7d78c2..1270ebf058eac4d72db8cd92277615f3057382d4 100644 (file)
@@ -2,10 +2,10 @@
 <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"
-         >
+       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_EDIT_USER_DATA}</ui:define>
@@ -15,7 +15,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and not userLoginController.ifUserMustChangePassword()}">
                                <div class="table">
                                        <div class="table_header">
                                                <h:outputText value="#{msg.LOGIN_EDIT_USER_DATA_TITLE}" />
 
                                        <div class="para">
                                                <ul>
-                                                       <li>
-                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA_TITLE}" outcome="login_change_personal_data" value="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA}" />
-                                                       </li>
-                                                       <li>
-                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" outcome="login_change_email_address" value="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS}" />
-                                                       </li>
-                                                       <li>
-                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_PASSWORD_TITLE}" outcome="login_change_password" value="#{msg.LINK_LOGIN_CHANGE_PASSWORD}" />
-                                                       </li>
+                                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data') and not userLoginController.ifUserMustChangePassword()}">
+                                                               <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()}">
+                                                               <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:fragment>
+
+                                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+                                                               <li>
+                                                                       <h:link title="#{msg.LINK_LOGIN_CHANGE_PASSWORD_TITLE}" outcome="login_change_password" value="#{msg.LINK_LOGIN_CHANGE_PASSWORD}" />
+                                                               </li>
+                                                       </ui:fragment>
                                                </ul>
                                        </div>
                                </div>
index 8954954a39b849e93d063422627dc884cec9c6c1..c9f812376808e5e658d2a5ad0f5de53d3902917c 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and not userLoginController.ifUserMustChangePassword()}">
                                Here goes your content.
                        </ui:fragment>
 
+                       <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}">
+                               <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" />
+                       </ui:fragment>
+
                        <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
                                <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
                        </ui:fragment>
index 91fcd108ad7a1f1b7d8872c2490e228a0be94111..b6e4638597d3417f215036ee196526ad39275a5b 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and not userLoginController.ifUserMustChangePassword()}">
                                <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
                                        <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
                                </ui:include>
                        </ui:fragment>
 
+                       <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}">
+                               <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" />
+                       </ui:fragment>
+
                        <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
                                <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
                        </ui:fragment>