aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/PermissionsManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-05-02 18:51:34 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-05-02 18:51:34 +1200
commitaf72af207613c80b8d66814d30644e4228e9b9e6 (patch)
tree56409810df0967976dce60799180fbee41e82439 /src/org/traccar/database/PermissionsManager.java
parent44da47950bdd75be57714158fd8a6d59c94460b5 (diff)
downloadtrackermap-server-af72af207613c80b8d66814d30644e4228e9b9e6.tar.gz
trackermap-server-af72af207613c80b8d66814d30644e4228e9b9e6.tar.bz2
trackermap-server-af72af207613c80b8d66814d30644e4228e9b9e6.zip
Refactor data manager code
Diffstat (limited to 'src/org/traccar/database/PermissionsManager.java')
-rw-r--r--src/org/traccar/database/PermissionsManager.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java
index 16ddd336d..e889afb06 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.Context;
import org.traccar.helper.Log;
+import org.traccar.model.Permission;
public class PermissionsManager {
@@ -42,8 +43,8 @@ public class PermissionsManager {
public final void refresh() {
permissions.clear();
try {
- for (Map.Entry<Long, Long> entry : Context.getDataManager().getPermissions()) {
- getNotNull(entry.getKey()).add(entry.getValue());
+ for (Permission permission : Context.getDataManager().getPermissions()) {
+ getNotNull(permission.getUserId()).add(permission.getDeviceId());
}
} catch (SQLException error) {
Log.warning(error);