aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/client/ApplicationContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/web/client/ApplicationContext.java')
-rw-r--r--src/org/traccar/web/client/ApplicationContext.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/org/traccar/web/client/ApplicationContext.java b/src/org/traccar/web/client/ApplicationContext.java
index f5053243..80b8998d 100644
--- a/src/org/traccar/web/client/ApplicationContext.java
+++ b/src/org/traccar/web/client/ApplicationContext.java
@@ -1,6 +1,7 @@
package org.traccar.web.client;
import org.traccar.web.shared.model.ApplicationSettings;
+import org.traccar.web.shared.model.User;
import org.traccar.web.shared.model.UserSettings;
public class ApplicationContext {
@@ -38,15 +39,25 @@ public class ApplicationContext {
}
}
- private UserSettings userSettings;
+ private User user;
+
+ public void setUser(User user) {
+ this.user = user;
+ }
+
+ public User getUser() {
+ return user;
+ }
public void setUserSettings(UserSettings userSettings) {
- this.userSettings = userSettings;
+ if (user != null) {
+ user.setUserSettings(userSettings);
+ }
}
public UserSettings getUserSettings() {
- if (userSettings != null) {
- return userSettings;
+ if (user != null && user.getUserSettings() != null) {
+ return user.getUserSettings();
} else {
return new UserSettings(); // default settings
}