diff options
author | Ivan Muratov <binakot@gmail.com> | 2017-10-24 14:52:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-24 14:52:48 +0300 |
commit | db02157dbb29539dda4b51a5e8b317293cfc536c (patch) | |
tree | b974f082172406e16a92cb9da8136ef856f571a5 /src/org/traccar/model/User.java | |
parent | 09d3cf2b5416327700ad22b652cf4a0dca09aaf2 (diff) | |
parent | 96e15853b9c28bd31295ca2c014e226e4a50aaa1 (diff) | |
download | trackermap-server-db02157dbb29539dda4b51a5e8b317293cfc536c.tar.gz trackermap-server-db02157dbb29539dda4b51a5e8b317293cfc536c.tar.bz2 trackermap-server-db02157dbb29539dda4b51a5e8b317293cfc536c.zip |
Merge branch 'master' into master
Diffstat (limited to 'src/org/traccar/model/User.java')
-rw-r--r-- | src/org/traccar/model/User.java | 50 |
1 files changed, 18 insertions, 32 deletions
diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java index 366ced503..5d89dcfae 100644 --- a/src/org/traccar/model/User.java +++ b/src/org/traccar/model/User.java @@ -16,12 +16,14 @@ package org.traccar.model; import com.fasterxml.jackson.annotation.JsonIgnore; + +import org.traccar.database.QueryExtended; +import org.traccar.database.QueryIgnore; import org.traccar.helper.Hashing; import java.util.Date; -import java.util.TimeZone; -public class User extends Extensible { +public class User extends ExtendedModel { private String name; @@ -40,7 +42,7 @@ public class User extends Extensible { } public void setEmail(String email) { - this.email = email; + this.email = email.trim(); } private String phone; @@ -83,26 +85,6 @@ public class User extends Extensible { this.map = map; } - private String distanceUnit; - - public String getDistanceUnit() { - return distanceUnit; - } - - public void setDistanceUnit(String distanceUnit) { - this.distanceUnit = distanceUnit; - } - - private String speedUnit; - - public String getSpeedUnit() { - return speedUnit; - } - - public void setSpeedUnit(String speedUnit) { - this.speedUnit = speedUnit; - } - private double latitude; public double getLatitude() { @@ -228,6 +210,17 @@ public class User extends Extensible { } } + private boolean limitCommands; + + public boolean getLimitCommands() { + return limitCommands; + } + + public void setLimitCommands(boolean limitCommands) { + this.limitCommands = limitCommands; + } + + @QueryIgnore public String getPassword() { return null; } @@ -243,6 +236,7 @@ public class User extends Extensible { private String hashedPassword; @JsonIgnore + @QueryExtended public String getHashedPassword() { return hashedPassword; } @@ -254,6 +248,7 @@ public class User extends Extensible { private String salt; @JsonIgnore + @QueryExtended public String getSalt() { return salt; } @@ -266,13 +261,4 @@ public class User extends Extensible { return Hashing.validatePassword(password, hashedPassword, salt); } - private String timezone; - - public void setTimezone(String timezone) { - this.timezone = timezone != null ? TimeZone.getTimeZone(timezone).getID() : null; - } - - public String getTimezone() { - return timezone; - } } |