aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-18 19:12:25 +1300
committerGitHub <noreply@github.com>2016-11-18 19:12:25 +1300
commit3eca9acd6e6a160df8f7b86150429c3d7c09b0c3 (patch)
treecb8bc7293a5c3fbac7f5e7557c73baded57109d8 /src/org/traccar/model
parentf04881e56938315867a97db2027d58f27f7a20fd (diff)
parentf35da3ffdf6f960a877149b72b819a1979c9395a (diff)
downloadtrackermap-server-3eca9acd6e6a160df8f7b86150429c3d7c09b0c3.tar.gz
trackermap-server-3eca9acd6e6a160df8f7b86150429c3d7c09b0c3.tar.bz2
trackermap-server-3eca9acd6e6a160df8f7b86150429c3d7c09b0c3.zip
Merge pull request #2548 from tananaev/users
Add user expiration and device limit
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/User.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java
index aa0b33713..a36fa0e31 100644
--- a/src/org/traccar/model/User.java
+++ b/src/org/traccar/model/User.java
@@ -18,6 +18,8 @@ package org.traccar.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.traccar.helper.Hashing;
+import java.util.Date;
+
public class User extends Extensible {
private String name;
@@ -140,6 +142,44 @@ public class User extends Extensible {
this.coordinateFormat = coordinateFormat;
}
+ private boolean disabled;
+
+ public boolean getDisabled() {
+ return disabled;
+ }
+
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+
+ private Date expirationTime;
+
+ public Date getExpirationTime() {
+ if (expirationTime != null) {
+ return new Date(expirationTime.getTime());
+ } else {
+ return null;
+ }
+ }
+
+ public void setExpirationTime(Date expirationTime) {
+ if (expirationTime != null) {
+ this.expirationTime = new Date(expirationTime.getTime());
+ } else {
+ this.expirationTime = null;
+ }
+ }
+
+ private int deviceLimit;
+
+ public int getDeviceLimit() {
+ return deviceLimit;
+ }
+
+ public void setDeviceLimit(int deviceLimit) {
+ this.deviceLimit = deviceLimit;
+ }
+
public String getPassword() {
return null;
}