From aa2fe75e3492e8be7642e06e8ed99c37ecd100b4 Mon Sep 17 00:00:00 2001 From: Steffen Schaefer Date: Fri, 27 Oct 2017 18:07:07 +0200 Subject: [PATCH] Bug 4032: Fixed a bug that caused an unwanted page refresh --- .../ui/authentication/AuthenticationManagerImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java b/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java index 81de687b92f..d170b5f4921 100644 --- a/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java +++ b/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java @@ -153,8 +153,10 @@ public class AuthenticationManagerImpl implements AuthenticationManager { public void onSuccess(SuccessInfo result) { if (result.isSuccessful()) { callback.onSuccess(result); - // when a user logs in we explicitly switch to the user's locale event if a locale is given by the URL - redirectIfLocaleIsSetAndLocaleIsNotGivenInTheURL(result.getUserDTO().getLocale()); + if (ExperimentalFeatures.REFRESH_ON_LOCALE_CHANGE_IN_USER_PROFILE) { + // when a user logs in we explicitly switch to the user's locale event if a locale is given by the URL + redirectIfLocaleIsSetAndLocaleIsNotGivenInTheURL(result.getUserDTO().getLocale()); + } } else { if (SuccessInfo.FAILED_TO_LOGIN.equals(result.getMessage())) { view.setErrorMessage(StringMessages.INSTANCE.failedToSignIn());