diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-08 23:38:48 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-08 23:38:48 +1300 |
commit | 2879646bc58467939349c367a7763cd1eb11fde2 (patch) | |
tree | 5b2a7cc9e4bee6af36d87e1775d272326b0af55c /src/org/traccar/database/PermissionsManager.java | |
parent | 3e76be5531f89fb906598435096e3eff54f86944 (diff) | |
download | trackermap-server-2879646bc58467939349c367a7763cd1eb11fde2.tar.gz trackermap-server-2879646bc58467939349c367a7763cd1eb11fde2.tar.bz2 trackermap-server-2879646bc58467939349c367a7763cd1eb11fde2.zip |
Add select group permissions query
Diffstat (limited to 'src/org/traccar/database/PermissionsManager.java')
-rw-r--r-- | src/org/traccar/database/PermissionsManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java index 854732fa2..0ed8227b4 100644 --- a/src/org/traccar/database/PermissionsManager.java +++ b/src/org/traccar/database/PermissionsManager.java @@ -23,6 +23,7 @@ import java.util.Map; import java.util.Set; import org.traccar.helper.Log; import org.traccar.model.DevicePermission; +import org.traccar.model.GroupPermission; import org.traccar.model.Server; import org.traccar.model.User; @@ -64,9 +65,12 @@ public class PermissionsManager { for (User user : dataManager.getUsers()) { users.put(user.getId(), user); } - for (DevicePermission permission : dataManager.getPermissions()) { + for (DevicePermission permission : dataManager.getDevicePermissions()) { getDevicePermissions(permission.getUserId()).add(permission.getDeviceId()); } + for (GroupPermission permission : dataManager.getGroupPermissions()) { + getGroupPermissions(permission.getUserId()).add(permission.getGroupId()); + } } catch (SQLException error) { Log.warning(error); } |