diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-22 10:55:48 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-22 10:55:48 -0700 |
commit | 9f8a78e5b7afddc6ccb0a54f4b3e59e1395de8eb (patch) | |
tree | 26356ca17e21d626843671aac23bf775c6451359 /src/main/java/org/traccar/model | |
parent | d9f51795058399e85ae83a8e308a0c2bc1d13e4b (diff) | |
parent | 9c9f5d66147cfa428ea18dd29103b9c82e529dca (diff) | |
download | trackermap-server-9f8a78e5b7afddc6ccb0a54f4b3e59e1395de8eb.tar.gz trackermap-server-9f8a78e5b7afddc6ccb0a54f4b3e59e1395de8eb.tar.bz2 trackermap-server-9f8a78e5b7afddc6ccb0a54f4b3e59e1395de8eb.zip |
Merge branch 'storage'
Diffstat (limited to 'src/main/java/org/traccar/model')
-rw-r--r-- | src/main/java/org/traccar/model/Permission.java | 2 | ||||
-rw-r--r-- | src/main/java/org/traccar/model/User.java | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/model/Permission.java b/src/main/java/org/traccar/model/Permission.java index ad0176b39..bace6b7d4 100644 --- a/src/main/java/org/traccar/model/Permission.java +++ b/src/main/java/org/traccar/model/Permission.java @@ -71,7 +71,7 @@ public class Permission { data.put(getKey(propertyClass), propertyId); } - private static String getKey(Class<?> clazz) { + public static String getKey(Class<?> clazz) { return Introspector.decapitalize(clazz.getSimpleName()) + "Id"; } diff --git a/src/main/java/org/traccar/model/User.java b/src/main/java/org/traccar/model/User.java index 464d0cbfe..6a67f3276 100644 --- a/src/main/java/org/traccar/model/User.java +++ b/src/main/java/org/traccar/model/User.java @@ -79,6 +79,12 @@ public class User extends ExtendedModel { private boolean administrator; + @QueryIgnore + @JsonIgnore + public boolean getManager() { + return userLimit != 0; + } + public boolean getAdministrator() { return administrator; } |