mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-22 21:55:39 +00:00
bug6151: show fewer details about locking/banning to user banned from signing up
This commit is contained in:
+2
@@ -127,6 +127,8 @@ public class AuthenticationManagerImpl implements AuthenticationManager {
|
||||
if (caught instanceof UserManagementException) {
|
||||
if (Util.hasLength(caught.getMessage()) && caught.getMessage().equals(USER_ALREADY_EXISTS)) {
|
||||
view.setErrorMessage(i18n.userAlreadyExists(name));
|
||||
} else if (Util.hasLength(caught.getMessage()) && caught.getMessage().equals(UserManagementException.CLIENT_CURRENTLY_LOCKED_FOR_USER_CREATION)) {
|
||||
view.setErrorMessage(i18n.clientCurrentlyLockedForUserCreation());
|
||||
} else {
|
||||
Notification.notify(i18n.errorCreatingUser(name, caught.getMessage()==null?"":caught.getMessage()), NotificationType.ERROR);
|
||||
}
|
||||
|
||||
+2
@@ -224,4 +224,6 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages {
|
||||
String paymentUnfinished();
|
||||
String paymentFinished();
|
||||
String lockedUntil();
|
||||
String passwordAuthenticationCurrentlyLockedForUser();
|
||||
String clientCurrentlyLockedForUserCreation();
|
||||
}
|
||||
|
||||
+3
-1
@@ -230,4 +230,6 @@ takeMeToSubscriptions=Go to subscription plans
|
||||
errorPollingCheckoutResults=Could not retrieve payment status.
|
||||
paymentUnfinished=Waiting for payment to process.
|
||||
paymentFinished=Payment successful. Plan roles have been granted.
|
||||
lockedUntil=Locked until
|
||||
lockedUntil=Locked until
|
||||
passwordAuthenticationCurrentlyLockedForUser=Password authentication is currently locked for this user due to too many failed login attempts. Please try again later.
|
||||
clientCurrentlyLockedForUserCreation=Client is currently locked for user creation after too many user creations by the same client. Please try again later.
|
||||
+3
-1
@@ -226,4 +226,6 @@ takeMeToSubscriptions=Zur Abbonementübersicht
|
||||
errorPollingCheckoutResults=Der Zahlungsstatus konnte nicht abgerufen werden.
|
||||
paymentUnfinished=Warte auf Zahlungsbestätigung.
|
||||
paymentFinished=Zahlung erfolgreich. Planrollen wurden verliehen.
|
||||
lockedUntil=Gesperrt bis
|
||||
lockedUntil=Gesperrt bis
|
||||
passwordAuthenticationCurrentlyLockedForUser=Passwort-Authentifizierung ist für diesen Benutzer derzeit aufgrund zu vieler fehlgeschlagener Versuche gesperrt. Bitter später erneut versuchen.
|
||||
clientCurrentlyLockedForUserCreation=Benutzererstellung für den aktuellen Client ist derzeit wegen zu vieler neuer Nutzer vom selben Client gesperrt. Bitte später erneut versuchen.
|
||||
+2
@@ -179,6 +179,8 @@ public class EditProfileEntryPoint implements EntryPoint {
|
||||
Notification.notify(stringMessages.passwordDoesNotMeetRequirements(), NotificationType.ERROR);
|
||||
} else if (UserManagementException.INVALID_CREDENTIALS.equals(message)) {
|
||||
Notification.notify(stringMessages.invalidCredentials(), NotificationType.ERROR);
|
||||
} else if (UserManagementException.PASSWORD_AUTHENTICATION_CURRENTLY_LOCKED_FOR_USER.equals(message)) {
|
||||
Notification.notify(stringMessages.passwordAuthenticationCurrentlyLockedForUser(), NotificationType.ERROR);
|
||||
} else {
|
||||
Notification.notify(stringMessages.errorChangingPassword(caught.getMessage()), NotificationType.ERROR);
|
||||
}
|
||||
|
||||
+25
-22
@@ -94,29 +94,32 @@ public class RegisterView extends Composite {
|
||||
/* fullName */ null, /* company */ null, LocaleInfo.getCurrentLocale().getLocaleName(),
|
||||
EntryPointLinkFactory.createEmailValidationLink(new HashMap<String, String>()),
|
||||
new AsyncCallback<UserDTO>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
final String message = caught.getMessage();
|
||||
if (caught instanceof UserManagementException) {
|
||||
if (Util.hasLength(message) && message.equals(USER_ALREADY_EXISTS)) {
|
||||
Notification.notify(stringMessages.userAlreadyExists(usernameTextBox.getText()), NotificationType.ERROR);
|
||||
} else {
|
||||
Notification.notify(stringMessages.errorCreatingUser(usernameTextBox.getText(), message==null?"":message), NotificationType.ERROR);
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
final String message = caught.getMessage();
|
||||
if (caught instanceof UserManagementException) {
|
||||
if (Util.hasLength(message) && message.equals(USER_ALREADY_EXISTS)) {
|
||||
Notification.notify(stringMessages.userAlreadyExists(usernameTextBox.getText()), NotificationType.ERROR);
|
||||
} else if (Util.hasLength(message) && message.equals(UserManagementException.CLIENT_CURRENTLY_LOCKED_FOR_USER_CREATION)) {
|
||||
Notification.notify(stringMessages.clientCurrentlyLockedForUserCreation(), NotificationType.ERROR);
|
||||
} else {
|
||||
Notification.notify(stringMessages.errorCreatingUser(usernameTextBox.getText(),
|
||||
message == null ? "" : message), NotificationType.ERROR);
|
||||
}
|
||||
} else {
|
||||
Notification.notify(stringMessages.errorCreatingUser(usernameTextBox.getText(), message), NotificationType.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(UserDTO result) {
|
||||
if (result != null) {
|
||||
Notification.notify(stringMessages.signedUpSuccessfully(result.getName()), NotificationType.SUCCESS);
|
||||
closeWindow();
|
||||
} else {
|
||||
Notification.notify(stringMessages.unknownErrorCreatingUser(usernameTextBox.getText()), NotificationType.ERROR);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Notification.notify(stringMessages.errorCreatingUser(usernameTextBox.getText(), message), NotificationType.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(UserDTO result) {
|
||||
if (result != null) {
|
||||
Notification.notify(stringMessages.signedUpSuccessfully(result.getName()), NotificationType.SUCCESS);
|
||||
closeWindow();
|
||||
} else {
|
||||
Notification.notify(stringMessages.unknownErrorCreatingUser(usernameTextBox.getText()), NotificationType.ERROR);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -103,6 +103,8 @@ public class UserDetailsPresenter implements AbstractUserDetails.Presenter {
|
||||
Notification.notify(i18n_sec.passwordDoesNotMeetRequirements(), NotificationType.ERROR);
|
||||
} else if (UserManagementException.INVALID_CREDENTIALS.equals(message)) {
|
||||
Notification.notify(i18n_sec.invalidCredentials(), NotificationType.ERROR);
|
||||
} else if (UserManagementException.PASSWORD_AUTHENTICATION_CURRENTLY_LOCKED_FOR_USER.equals(message)) {
|
||||
Notification.notify(i18n_sec.passwordAuthenticationCurrentlyLockedForUser(), NotificationType.ERROR);
|
||||
} else {
|
||||
Notification.notify(i18n_sec.errorChangingPassword(caught.getMessage()), NotificationType.ERROR);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user