aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-12-28 16:51:41 +1300
committerGitHub <noreply@github.com>2017-12-28 16:51:41 +1300
commit6e0be9857bc26c59936d4446ef15488bd90f5150 (patch)
treecec25dcca31ba5c88db721c750f88a0ddb541f8e /src/org/traccar/api
parentf128ed17780ad56dfd889d617f518cc0310a96a7 (diff)
parent71ef701357da0b4b5c8214418b6b149e87c16ac2 (diff)
downloadtrackermap-server-6e0be9857bc26c59936d4446ef15488bd90f5150.tar.gz
trackermap-server-6e0be9857bc26c59936d4446ef15488bd90f5150.tar.bz2
trackermap-server-6e0be9857bc26c59936d4446ef15488bd90f5150.zip
Merge pull request #3700 from Abyss777/disable_device2
Implement device disable (simple)
Diffstat (limited to 'src/org/traccar/api')
-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) {