diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-25 18:59:29 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-25 18:59:29 +1200 |
commit | 234223a179d3f5e390cf8a649158676f8c349e5c (patch) | |
tree | e40066f50ead2270bda27fd9ce2cbf4a702c09fd /src/org/traccar/database/DeviceManager.java | |
parent | 6253fa291c3a2962fef2076c0cbb0f4e1ca8a3b4 (diff) | |
parent | 68af658ea2ff9593e5be7a2b2cfcb75c744fd749 (diff) | |
download | traccar-server-234223a179d3f5e390cf8a649158676f8c349e5c.tar.gz traccar-server-234223a179d3f5e390cf8a649158676f8c349e5c.tar.bz2 traccar-server-234223a179d3f5e390cf8a649158676f8c349e5c.zip |
Merge pull request #3388 from Abyss777/optimize_users
Move users management to separate manager
Diffstat (limited to 'src/org/traccar/database/DeviceManager.java')
-rw-r--r-- | src/org/traccar/database/DeviceManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/database/DeviceManager.java b/src/org/traccar/database/DeviceManager.java index 6637df91c..995aa8ac3 100644 --- a/src/org/traccar/database/DeviceManager.java +++ b/src/org/traccar/database/DeviceManager.java @@ -192,7 +192,7 @@ public class DeviceManager implements IdentityManager { public Collection<Device> getManagedDevices(long userId) throws SQLException { Collection<Device> devices = new HashSet<>(); devices.addAll(getDevices(userId)); - for (long managedUserId : Context.getPermissionsManager().getUserPermissions(userId)) { + for (long managedUserId : Context.getUsersManager().getManagedItems(userId)) { devices.addAll(getDevices(managedUserId)); } return devices; @@ -340,7 +340,7 @@ public class DeviceManager implements IdentityManager { public Collection<Group> getManagedGroups(long userId) throws SQLException { Collection<Group> groups = new ArrayList<>(); groups.addAll(getGroups(userId)); - for (long managedUserId : Context.getPermissionsManager().getUserPermissions(userId)) { + for (long managedUserId : Context.getUsersManager().getManagedItems(userId)) { groups.addAll(getGroups(managedUserId)); } return groups; |