aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/DeviceResource.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-12-27 16:38:13 +0500
committerAbyss777 <abyss@fox5.ru>2017-12-27 16:38:13 +0500
commitd489eac12119ed62f899569db121364b20b1c9dc (patch)
treeaac938b2511bb9d45a7048236b93c6d740c457be /src/org/traccar/api/resource/DeviceResource.java
parentf128ed17780ad56dfd889d617f518cc0310a96a7 (diff)
downloadtrackermap-server-d489eac12119ed62f899569db121364b20b1c9dc.tar.gz
trackermap-server-d489eac12119ed62f899569db121364b20b1c9dc.tar.bz2
trackermap-server-d489eac12119ed62f899569db121364b20b1c9dc.zip
Implement device disable
Diffstat (limited to 'src/org/traccar/api/resource/DeviceResource.java')
-rw-r--r--src/org/traccar/api/resource/DeviceResource.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/api/resource/DeviceResource.java b/src/org/traccar/api/resource/DeviceResource.java
index fda96a09d..0ea532567 100644
--- a/src/org/traccar/api/resource/DeviceResource.java
+++ b/src/org/traccar/api/resource/DeviceResource.java
@@ -65,7 +65,11 @@ public class DeviceResource extends BaseObjectResource<Device> {
userId = getUserId();
}
Context.getPermissionsManager().checkUser(getUserId(), userId);
- result = deviceManager.getUserItems(userId);
+ if (Context.getPermissionsManager().getUserAdmin(getUserId())) {
+ result = deviceManager.getAllUserItems(userId);
+ } else {
+ result = deviceManager.getUserItems(userId);
+ }
} else {
result = new HashSet<Long>();
for (String uniqueId : uniqueIds) {