aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/DataManager.java6
-rw-r--r--src/org/traccar/database/PermissionsManager.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 73984952e..f040ecd20 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -39,7 +39,7 @@ import org.traccar.Config;
import org.traccar.helper.Log;
import org.traccar.model.Device;
import org.traccar.model.MiscFormatter;
-import org.traccar.model.Permission;
+import org.traccar.model.DevicePermission;
import org.traccar.model.Position;
import org.traccar.model.Server;
import org.traccar.model.User;
@@ -221,9 +221,9 @@ public class DataManager implements IdentityManager {
.executeUpdate();
}
- public Collection<Permission> getPermissions() throws SQLException {
+ public Collection<DevicePermission> getPermissions() throws SQLException {
return QueryBuilder.create(dataSource, getQuery("database.getPermissionsAll"))
- .executeQuery(Permission.class);
+ .executeQuery(DevicePermission.class);
}
public Collection<Device> getAllDevices() throws SQLException {
diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java
index c676dea23..29228ceeb 100644
--- a/src/org/traccar/database/PermissionsManager.java
+++ b/src/org/traccar/database/PermissionsManager.java
@@ -22,7 +22,7 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.traccar.helper.Log;
-import org.traccar.model.Permission;
+import org.traccar.model.DevicePermission;
import org.traccar.model.Server;
import org.traccar.model.User;
@@ -56,7 +56,7 @@ public class PermissionsManager {
for (User user : dataManager.getUsers()) {
users.put(user.getId(), user);
}
- for (Permission permission : dataManager.getPermissions()) {
+ for (DevicePermission permission : dataManager.getPermissions()) {
getPermissions(permission.getUserId()).add(permission.getDeviceId());
}
} catch (SQLException error) {