From d489eac12119ed62f899569db121364b20b1c9dc Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Wed, 27 Dec 2017 16:38:13 +0500 Subject: Implement device disable --- src/org/traccar/api/resource/DeviceResource.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/api/resource') 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 { 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(); for (String uniqueId : uniqueIds) { -- cgit v1.2.3