From 9e639fa60eb238cff3940ae6d982650959875345 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 26 Aug 2016 10:45:29 +0200 Subject: [PATCH] Please cherry-pick: - added methods to controller to expand activity type for admin and user respectivly - renamed user-registration-event method to have "User" in it as this is explicity for users - renamed user-logout-event observer method to have "Event" as suffix - fixed template, no user here (copy-paste mistake) - also add new event to controller's list - added missing i18n strings for user activity log - added missing navigation rule MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../contact/JobsContactWebSessionBean.java | 2 +- .../JobsContactWebSessionController.java | 2 +- .../JobsLocalizationSessionBean.java | 26 ++++- .../JobsLocalizationSessionController.java | 8 ++ .../user/JobsAdminUserWebRequestBean.java | 5 +- .../JobsAdminUserWebRequestController.java | 2 +- .../beans/user/JobsUserWebSessionBean.java | 2 +- .../user/JobsUserWebSessionController.java | 2 +- .../JobsUserActivityWebApplicationBean.java | 108 ++++++++++++++---- ...sUserActivityWebApplicationController.java | 30 ++++- .../validator/user/JobsUserIdValidator.java | 8 +- .../localization/bundle_de_DE.properties | 29 +++++ .../localization/bundle_en_US.properties | 29 +++++ web/WEB-INF/faces-config.xml | 8 ++ web/admin/user/admin_user_activity_log.xhtml | 4 +- 15 files changed, 221 insertions(+), 44 deletions(-) diff --git a/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java index 6108f6d2..37fab8ea 100644 --- a/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java @@ -452,7 +452,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job } @Override - public void afterRegistrationEvent (@Observes final UserRegisteredEvent event) { + public void afterUserRegistrationEvent (@Observes final UserRegisteredEvent event) { // event should not be null if (null == event) { // Throw NPE diff --git a/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionController.java b/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionController.java index 7a98cc31..525f6e6b 100644 --- a/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionController.java +++ b/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionController.java @@ -126,7 +126,7 @@ public interface JobsContactWebSessionController extends Serializable { *

* @param event User registration event */ - void afterRegistrationEvent (final UserRegisteredEvent event); + void afterUserRegistrationEvent (final UserRegisteredEvent event); /** * Observes events being fired when an administrator has added a new diff --git a/src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionBean.java b/src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionBean.java index c6eb7c4e..941da4bc 100644 --- a/src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionBean.java @@ -25,6 +25,7 @@ import javax.faces.context.FacesContext; import javax.inject.Named; import org.mxchange.jjobs.beans.BaseJobsController; import org.mxchange.jusercore.events.login.UserLoggedInEvent; +import org.mxchange.jusercore.events.logout.ObserveableUserLogoutEvent; /** * A session bean for handling localization/internationalization changes. This @@ -65,8 +66,29 @@ public class JobsLocalizationSessionBean extends BaseJobsController implements J throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getLoggedInUser(), event.getLoggedInUser().getUserId())); //NOI18N } - // Set locale here - this.setLocale(event.getLoggedInUser().getUserLocale()); + // Is the locale set? + if (event.getLoggedInUser().getUserLocale() instanceof Locale) { + // Set locale here + this.setLocale(event.getLoggedInUser().getUserLocale()); + } + } + + @Override + public void afterUserLogoutEvent (@Observes final ObserveableUserLogoutEvent event) { + // event should not be null + if (null == event) { + // Throw NPE + throw new NullPointerException("event is null"); //NOI18N + } else if (event.getLoggedOutUser() == null) { + // Throw NPE again + throw new NullPointerException("event.loggedOutUser is null"); //NOI18N + } else if (event.getLoggedOutUser().getUserId() == null) { + // userId is null + throw new NullPointerException("event.loggedOutUser.userId is null"); //NOI18N + } else if (event.getLoggedOutUser().getUserId() < 1) { + // Not avalid id + throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getLoggedOutUser(), event.getLoggedOutUser().getUserId())); //NOI18N + } // Trace message //* NOISY-DEBUG: */ System.out.println("LandingLocalizationSessionBean:afterUserLogin - EXIT!"); //NOI18N diff --git a/src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionController.java b/src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionController.java index 37612465..2787da6b 100644 --- a/src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionController.java +++ b/src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionController.java @@ -19,6 +19,7 @@ package org.mxchange.jjobs.beans.localization; import java.io.Serializable; import java.util.Locale; import org.mxchange.jusercore.events.login.UserLoggedInEvent; +import org.mxchange.jusercore.events.logout.ObserveableUserLogoutEvent; /** * An interface for localization change beans @@ -34,6 +35,13 @@ public interface JobsLocalizationSessionController extends Serializable { */ void afterUserLoginEvent (final UserLoggedInEvent event); + /** + * Event observer for logged-out user + *

+ * @param event Event instance + */ + void afterUserLogoutEvent (final ObserveableUserLogoutEvent event); + /** * Getter for locale *

diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java index 19e7b17a..f8158ea5 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java @@ -310,10 +310,7 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J } @Override - public void afterRegistrationEvent (@Observes final UserRegisteredEvent event) { - // Trace message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterRegistration: event={0} - CALLED!", event)); //NOI18N - + public void afterUserRegistrationEvent (@Observes final UserRegisteredEvent event) { // event should not be null if (null == event) { // Throw NPE diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java index fd466e4c..2a99cf32 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestController.java @@ -32,7 +32,7 @@ public interface JobsAdminUserWebRequestController extends Serializable { *

* @param event User registration event */ - void afterRegistrationEvent (final UserRegisteredEvent event); + void afterUserRegistrationEvent (final UserRegisteredEvent event); /** * Adds user instance to database by preparing a complete user instance and diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java index 84dcdc21..ee16e15b 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java @@ -289,7 +289,7 @@ public class JobsUserWebSessionBean extends BaseJobsController implements JobsUs } @Override - public void afterRegistrationEvent (@Observes final UserRegisteredEvent event) { + public void afterUserRegistrationEvent (@Observes final UserRegisteredEvent event) { // event should not be null if (null == event) { // Throw NPE diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java index 0ecb8096..e1c24182 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java @@ -108,7 +108,7 @@ public interface JobsUserWebSessionController extends Serializable { *

* @param event User registration event */ - void afterRegistrationEvent (final UserRegisteredEvent event); + void afterUserRegistrationEvent (final UserRegisteredEvent event); /** * Event observer for logged-in user diff --git a/src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebApplicationBean.java b/src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebApplicationBean.java index 722385d4..6dbd5476 100644 --- a/src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebApplicationBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebApplicationBean.java @@ -35,6 +35,7 @@ import org.mxchange.jjobs.beans.BaseJobsController; import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController; import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent; import org.mxchange.jusercore.events.login.UserLoggedInEvent; +import org.mxchange.jusercore.events.logout.ObserveableUserLogoutEvent; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.events.resendlink.UserResendLinkAccountEvent; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; @@ -125,6 +126,9 @@ public class JobsUserActivityWebApplicationBean extends BaseJobsController imple // Call bean to add it this.userActivityBean.addUserActivityLog(userActivity); + + // Add to cache, too + this.usersActivity.get(user).add(userActivity); } @Override @@ -158,6 +162,9 @@ public class JobsUserActivityWebApplicationBean extends BaseJobsController imple // Call bean to add it this.userActivityBean.addUserActivityLog(userActivity); + + // Add to cache, too + this.usersActivity.get(user).add(userActivity); } @Override @@ -265,27 +272,6 @@ public class JobsUserActivityWebApplicationBean extends BaseJobsController imple this.addUserActivity(event.getUpdatedUser(), "ADMIN_UPDATED_USER_PERSONAL_DATA"); //NOI18N } - @Override - public void afterRegistrationEvent (@Observes final UserRegisteredEvent event) { - // event should not be null - if (null == event) { - // Throw NPE - throw new NullPointerException("event is null"); //NOI18N - } else if (event.getRegisteredUser() == null) { - // Throw NPE again - throw new NullPointerException("event.registeredUser is null"); //NOI18N - } else if (event.getRegisteredUser().getUserId() == null) { - // userId is null - throw new NullPointerException("event.registeredUser.userId is null"); //NOI18N - } else if (event.getRegisteredUser().getUserId() < 1) { - // Not avalid id - throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getRegisteredUser(), event.getRegisteredUser().getUserId())); //NOI18N - } - - // Update user list - this.addUserActivity(event.getRegisteredUser(), "USER_REGISTERED_NEW_ACCOUNT"); //NOI18N - } - @Override public void afterUserConfirmedAccountEvent (@Observes final UserConfirmedAccountEvent event) { // event should not be null @@ -328,13 +314,55 @@ public class JobsUserActivityWebApplicationBean extends BaseJobsController imple this.addUserActivity(event.getLoggedInUser(), "USER_LOGGED_IN"); //NOI18N } + @Override + public void afterUserLogoutEvent (@Observes final ObserveableUserLogoutEvent event) { + // event should not be null + if (null == event) { + // Throw NPE + throw new NullPointerException("event is null"); //NOI18N + } else if (event.getLoggedOutUser()== null) { + // Throw NPE again + throw new NullPointerException("event.loggedOutUser is null"); //NOI18N + } else if (event.getLoggedOutUser().getUserId() == null) { + // userId is null + throw new NullPointerException("event.loggedOutUser.userId is null"); //NOI18N + } else if (event.getLoggedOutUser().getUserId() < 1) { + // Not avalid id + throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getLoggedOutUser(), event.getLoggedOutUser().getUserId())); //NOI18N + } + + // Update user list + this.addUserActivity(event.getLoggedOutUser(), "USER_LOGGED_OUT"); //NOI18N + } + + @Override + public void afterUserRegistrationEvent (@Observes final UserRegisteredEvent event) { + // event should not be null + if (null == event) { + // Throw NPE + throw new NullPointerException("event is null"); //NOI18N + } else if (event.getRegisteredUser() == null) { + // Throw NPE again + throw new NullPointerException("event.registeredUser is null"); //NOI18N + } else if (event.getRegisteredUser().getUserId() == null) { + // userId is null + throw new NullPointerException("event.registeredUser.userId is null"); //NOI18N + } else if (event.getRegisteredUser().getUserId() < 1) { + // Not avalid id + throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getRegisteredUser(), event.getRegisteredUser().getUserId())); //NOI18N + } + + // Update user list + this.addUserActivity(event.getRegisteredUser(), "USER_REGISTERED_NEW_ACCOUNT"); //NOI18N + } + @Override public void afterUserResendConfirmationLinkEvent (@Observes final UserResendLinkAccountEvent event) { // event should not be null if (null == event) { // Throw NPE throw new NullPointerException("event is null"); //NOI18N - } else if (event.getResendLinkUser()== null) { + } else if (event.getResendLinkUser() == null) { // Throw NPE again throw new NullPointerException("event.resendLinkUser is null"); //NOI18N } else if (event.getResendLinkUser().getUserId() == null) { @@ -399,13 +427,13 @@ public class JobsUserActivityWebApplicationBean extends BaseJobsController imple // beanHelper.user should be set and valid if (null == user) { // Is not set - throw new NullPointerException("this.beanHelper.user is null"); + throw new NullPointerException("this.beanHelper.user is null"); //NOI18N } else if (user.getUserId() == null) { // Throw NPE again - throw new NullPointerException("this.beanHelper.user.userId is null"); + throw new NullPointerException("this.beanHelper.user.userId is null"); //NOI18N } else if (user.getUserId() < 1) { // Invalid id number - throw new IllegalArgumentException(MessageFormat.format("this.beanHelper.user.userId={0} is not valid", user.getUserId())); + throw new IllegalArgumentException(MessageFormat.format("this.beanHelper.user.userId={0} is not valid", user.getUserId())); //NOI18N } // Init list @@ -421,6 +449,36 @@ public class JobsUserActivityWebApplicationBean extends BaseJobsController imple return list; } + @Override + public String expandAdminActivityType (final String activityType) { + // Is it valid? + if (null == activityType) { + // Throw NPE + throw new NullPointerException("activityType is null"); //NOI18N + } else if (activityType.isEmpty()) { + // Is empty + throw new IllegalArgumentException("activityType is empty"); //NOI18N + } + + // Expand it + return "ADMIN_ACTIVITY_" + activityType; //NOI18N + } + + @Override + public String expandUserActivityType (final String activityType) { + // Is it valid? + if (null == activityType) { + // Throw NPE + throw new NullPointerException("activityType is null"); //NOI18N + } else if (activityType.isEmpty()) { + // Is empty + throw new IllegalArgumentException("activityType is empty"); //NOI18N + } + + // Expand it + return "USER_ACTIVITY_" + activityType; //NOI18N + } + /** * Post-constructor method */ diff --git a/src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebApplicationController.java b/src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebApplicationController.java index c576b632..4bc30ada 100644 --- a/src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebApplicationController.java +++ b/src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebApplicationController.java @@ -21,6 +21,7 @@ import java.util.List; import javax.ejb.Local; import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent; import org.mxchange.jusercore.events.login.UserLoggedInEvent; +import org.mxchange.jusercore.events.logout.ObserveableUserLogoutEvent; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.events.resendlink.UserResendLinkAccountEvent; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; @@ -83,6 +84,13 @@ public interface JobsUserActivityWebApplicationController extends Serializable { */ void afterUserConfirmedAccountEvent (final UserConfirmedAccountEvent event); + /** + * Event observer for logged-out user + *

+ * @param event Event instance + */ + void afterUserLogoutEvent (final ObserveableUserLogoutEvent event); + /** * Method being call after user's password has been updated (and history * entry has been created). @@ -103,7 +111,7 @@ public interface JobsUserActivityWebApplicationController extends Serializable { *

* @param event Event being fired */ - void afterRegistrationEvent (final UserRegisteredEvent event); + void afterUserRegistrationEvent (final UserRegisteredEvent event); /** * Event observer for logged-in user @@ -141,6 +149,24 @@ public interface JobsUserActivityWebApplicationController extends Serializable { *

* @return List of user's activity log */ - List allCurrentUsersActivityLog(); + List allCurrentUsersActivityLog (); + + /** + * Expands given activity type into a i18n string for administrators + *

+ * @param activityType Activity type + *

+ * @return Expanded i18n string + */ + String expandAdminActivityType (final String activityType); + + /** + * Expands given activity type into a i18n string for users + *

+ * @param activityType Activity type + *

+ * @return Expanded i18n string + */ + String expandUserActivityType (final String activityType); } diff --git a/src/java/org/mxchange/jjobs/validator/user/JobsUserIdValidator.java b/src/java/org/mxchange/jjobs/validator/user/JobsUserIdValidator.java index 27f7011e..2afa843f 100644 --- a/src/java/org/mxchange/jjobs/validator/user/JobsUserIdValidator.java +++ b/src/java/org/mxchange/jjobs/validator/user/JobsUserIdValidator.java @@ -90,9 +90,9 @@ public class JobsUserIdValidator extends BaseLongValidator implements Validator *

* @param event User registration event */ - public void afterRegistrationEvent (@Observes final UserRegisteredEvent event) { + public void afterUserRegistrationEvent (@Observes final UserRegisteredEvent event) { // Trace message - this.loggerBeanLocal.logTrace(MessageFormat.format("UserIdValidator:afterRegistrationEvent: event={0} - CALLED!", event)); //NOI18N + this.loggerBeanLocal.logTrace(MessageFormat.format("UserIdValidator:afterUserRegistrationEvent: event={0} - CALLED!", event)); //NOI18N // event should not be null if (null == event) { @@ -113,13 +113,13 @@ public class JobsUserIdValidator extends BaseLongValidator implements Validator User registeredUser = event.getRegisteredUser(); // Debug message - this.loggerBeanLocal.logDebug(MessageFormat.format("UserIdValidator:afterRegistrationEvent: registeredUser={0}", registeredUser)); //NOI18N + this.loggerBeanLocal.logDebug(MessageFormat.format("UserIdValidator:afterUserRegistrationEvent: registeredUser={0}", registeredUser)); //NOI18N // Update cache JobsUserIdValidator.cachedStatus.add(registeredUser.getUserId()); // Trace message - this.loggerBeanLocal.logTrace("UserIdValidator:afterRegistrationEvent: EXIT!"); //NOI18N + this.loggerBeanLocal.logTrace("UserIdValidator:afterUserRegistrationEvent: EXIT!"); //NOI18N } @Override diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 9e2e6036..8df49098 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -738,3 +738,32 @@ CONTENT_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK=Neuen Best\u00e4tigungslink ve ADMIN_SHOW_USER_ID=Benutzer-Id: TABLE_SUMMARY_ADMIN_LIST_USER_ACTIVITY_LOG=Diese Tabelle enth\u00e4lt die Aktivit\u00e4ten des ausgew\u00e4hlten Benutzeraccounts. ADMIN_LINK_SHOW_USER_ACTIVITY_LOG=Aktivit\u00e4ten des Benutzers auflisten +PAGE_TITLE_ADMIN_USER_ACTIVITY_LOG=Logbuch Benutzeraktivit\u00e4ten +CONTENT_TITLE_ADMIN_USER_ACTIVITY_LOG=Logbuch Benutzeraktivit\u00e4ten: +ADMIN_LIST_USER_ACTIVIRY_LOG_MESSAGE=Nachricht an Benutzer: +ADMIN_LIST_USER_ACTIVIRY_LOG_TYPE=Aktivit\u00e4t: +ADMIN_LIST_USER_ACTIVITY_LOG_TIMESTAMP=Zeitmarke: +ADMIN_ACTIVITY_ADMIN_LINKED_USER_ACCOUNT=Kontaktdaten mit Benutzeraccount verlinkt. +USER_ACTIVITY_ADMIN_LINKED_USER_ACCOUNT=Ihr Account wurde aus bestehenden Kontaktdaten erstellt. +ADMIN_ACTIVITY_ADMIN_LOCKED_USER_ACCOUNT=Benutzer wurde vom Administrator gesperrt. +USER_ACTIVITY_ADMIN_LOCKED_USER_ACCOUNT=Ihr Account wurde vom Administrator geperrt. +ADMIN_ACTIVITY_ADMIN_UNLOCKED_USER_ACCOUNT=Benutzeraccount wurde vom Administrator freigegeben. +USER_ACTIVITY_ADMIN_UNLOCKED_USER_ACCOUNT=Ihr Account wurde vom Administrator wieder freigegeben. +ADMIN_ACTIVITY_ADMIN_UPDATED_USER_PERSONAL_DATA=Pers\u00f6nliche Daten des Benutzers vom Administrator ge\u00e4ndert. +USER_ACTIVITY_ADMIN_UPDATED_USER_PERSONAL_DATA=Ihre pers\u00f6nlichen Daten wurden vom Administrator ge\u00e4ndert. +ADMIN_ACTIVITY_USER_REGISTERED_NEW_ACCOUNT=Ein neuer Benutzer hat sich registriert. +USER_ACTIVITY_USER_REGISTERED_NEW_ACCOUNT=Sie haben sich an dieser Webseite registriert. +ADMIN_ACTIVITY_USER_CONFIRMED_ACCOUNT=Benutzer hat Account best\u00e4tigt. +USER_ACTIVITY_USER_CONFIRMED_ACCOUNT=Sie haben Ihren Account best\u00e4tigt. +ADMIN_ACTIVITY_USER_LOGGED_IN=Benutzer hat sich eingeloggt. +USER_ACTIVITY_USER_LOGGED_IN=Sie haben sich eingeloggt. +ADMIN_ACTIVITY_USER_RESEND_CONFIRMATION_LINK=Benutzer hat neuen Best\u00e4tigungslink angefordert. +USER_ACTIVITY_USER_RESEND_CONFIRMATION_LINK=Sie haben einen neuen Best\u00e4tigungslink angefordert. +ADMIN_ACTIVITY_USER_UPDATED_PASSWORD=Benutzer hat sein Zugangspasswort ge\u00e4ndert. +USER_ACTIVITY_USER_UPDATED_PASSWORD=Sie haben Ihr Zugangspasswort ge\u00e4ndert. +ADMIN_ACTIVITY_USER_UPDATED_PERSONAL_DATA=Benutzer hat pers\u00f6nliche Daten ge\u00e4ndert. +USER_ACTIVITY_USER_UPDATED_PERSONAL_DATA=Sie haben Ihre pers\u00f6nlichen Daten ge\u00e4ndert. +ADMIN_ACTIVITY_ADMIN_ADDED_USER_ACCOUNT=Administrator hat neues Benutzeraccount angelegt. +USER_ACTIVITY_ADMIN_ADDED_USER_ACCOUNT=Ein Administrator hat Ihren Benutzeracciunt angelegt. +ADMIN_ACTIVITY_USER_LOGGED_OUT=Benutzer hat sich ausgeloggt. +USER_ACTIVITY_USER_LOGGED_OUT=Sie haben sich ausgeloggt. diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index fc84a6fe..93e0f3b3 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -739,3 +739,32 @@ CONTENT_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK=Send new confirmation link: ADMIN_SHOW_USER_ID=User id: TABLE_SUMMARY_ADMIN_LIST_USER_ACTIVITY_LOG=This table shows choosen user's activity log. ADMIN_LINK_SHOW_USER_ACTIVITY_LOG=List user's actitivy log +PAGE_TITLE_ADMIN_USER_ACTIVITY_LOG=Logfile of user activity +CONTENT_TITLE_ADMIN_USER_ACTIVITY_LOG=Logfile of user activity: +ADMIN_LIST_USER_ACTIVIRY_LOG_MESSAGE=Message to user: +ADMIN_LIST_USER_ACTIVIRY_LOG_TYPE=Activity: +ADMIN_LIST_USER_ACTIVITY_LOG_TIMESTAMP=Timestamp: +ADMIN_ACTIVITY_ADMIN_LINKED_USER_ACCOUNT=Contact data linked with user account. +USER_ACTIVITY_ADMIN_LINKED_USER_ACCOUNT=Your account has been created with existing contact data. +ADMIN_ACTIVITY_ADMIN_LOCKED_USER_ACCOUNT=User was locked by administrator. +USER_ACTIVITY_ADMIN_LOCKED_USER_ACCOUNT=Your account has been locked by an administrator. +ADMIN_ACTIVITY_ADMIN_UNLOCKED_USER_ACCOUNT=User was unlocked by an administrator. +USER_ACTIVITY_ADMIN_UNLOCKED_USER_ACCOUNT=Your account has been unlocked by an administrator. +ADMIN_ACTIVITY_ADMIN_UPDATED_USER_PERSONAL_DATA=Personal data of the user was changed by administrator. +USER_ACTIVITY_ADMIN_UPDATED_USER_PERSONAL_DATA=Your personal data has been changed by an administrator. +ADMIN_ACTIVITY_USER_REGISTERED_NEW_ACCOUNT=A new user has registered. +USER_ACTIVITY_USER_REGISTERED_NEW_ACCOUNT=You have registered with this website. +ADMIN_ACTIVITY_USER_CONFIRMED_ACCOUNT=User has confirmed account. +ADMIN_ACTIVITY_USER_LOGGED_IN=User has logged in. +USER_ACTIVITY_USER_CONFIRMED_ACCOUNT=You have confirmed your user account. +USER_ACTIVITY_USER_LOGGED_IN=You have logged in. +ADMIN_ACTIVITY_USER_RESEND_CONFIRMATION_LINK=User has requested new confirmation link. +USER_ACTIVITY_USER_RESEND_CONFIRMATION_LINK=You have requested a new confirmation link. +ADMIN_ACTIVITY_USER_UPDATED_PASSWORD=User has changed account password. +USER_ACTIVITY_USER_UPDATED_PASSWORD=You have changed your account password. +ADMIN_ACTIVITY_USER_UPDATED_PERSONAL_DATA=User has changed personal data. +USER_ACTIVITY_USER_UPDATED_PERSONAL_DATA=You have changed your personal data. +ADMIN_ACTIVITY_ADMIN_ADDED_USER_ACCOUNT=An administrator has created a new user account. +USER_ACTIVITY_ADMIN_ADDED_USER_ACCOUNT=An aministrator has created your new user account. +ADMIN_ACTIVITY_USER_LOGGED_OUT=User has logged out. +USER_ACTIVITY_USER_LOGGED_OUT=You have logged out. diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 0d3ed4ef..982cd10c 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -283,6 +283,7 @@ /admin/mobile_provider/admin_mobile_provider_show.xhtml + /admin/user/admin_user_list.xhtml @@ -702,6 +703,13 @@ /admin/user/admin_user_show.xhtml + + /admin/user/admin_user_activity_log.xhtml + + admin_show_user + /admin/user/admin_user_show.xhtml + +