mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
Changed UserManagementService.updateUserProperties to also update the
user's locale
This commit is contained in:
1 parent
1b0c923bb1
commit
0163cc5571
6 files changed
+15
-9
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package com.sap.sse.security;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -57,7 +58,7 @@ public interface SecurityService extends ReplicableWithObjectInputStream<Replica
|
||||
|
||||
void updateSimpleUserEmail(String username, String newEmail, String validationBaseURL) throws UserManagementException;
|
||||
|
||||
void updateUserProperties(String username, String fullName, String company) throws UserManagementException;
|
||||
void updateUserProperties(String username, String fullName, String company, Locale locale) throws UserManagementException;
|
||||
|
||||
User createSocialUser(String username, SocialUserAccount socialUserAccount) throws UserManagementException;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.net.URLEncoder;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
@@ -391,17 +392,18 @@ public class SecurityServiceImpl implements ReplicableSecurityService, ClearStat
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUserProperties(String username, String fullName, String company) throws UserManagementException {
|
||||
public void updateUserProperties(String username, String fullName, String company, Locale locale) throws UserManagementException {
|
||||
final User user = store.getUserByName(username);
|
||||
if (user == null) {
|
||||
throw new UserManagementException(UserManagementException.USER_DOES_NOT_EXIST);
|
||||
}
|
||||
updateUserProperties(user, fullName, company);
|
||||
updateUserProperties(user, fullName, company, locale);
|
||||
}
|
||||
|
||||
private void updateUserProperties(User user, String fullName, String company) {
|
||||
private void updateUserProperties(User user, String fullName, String company, Locale locale) {
|
||||
user.setFullName(fullName);
|
||||
user.setCompany(company);
|
||||
user.setLocale(locale);
|
||||
apply(s->s.internalStoreUser(user));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user