aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 5b4524f2e..9a8a14615 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -39,6 +39,7 @@ import org.traccar.Config;
import org.traccar.helper.Log;
import org.traccar.model.Device;
import org.traccar.model.Group;
+import org.traccar.model.GroupPermission;
import org.traccar.model.MiscFormatter;
import org.traccar.model.DevicePermission;
import org.traccar.model.Position;
@@ -222,11 +223,16 @@ public class DataManager implements IdentityManager {
.executeUpdate();
}
- public Collection<DevicePermission> getPermissions() throws SQLException {
- return QueryBuilder.create(dataSource, getQuery("database.getPermissionsAll"))
+ public Collection<DevicePermission> getDevicePermissions() throws SQLException {
+ return QueryBuilder.create(dataSource, getQuery("database.selectDevicePermissions"))
.executeQuery(DevicePermission.class);
}
+ public Collection<GroupPermission> getGroupPermissions() throws SQLException {
+ return QueryBuilder.create(dataSource, getQuery("database.selectGroupPermissions"))
+ .executeQuery(GroupPermission.class);
+ }
+
public Collection<Device> getAllDevices() throws SQLException {
return QueryBuilder.create(dataSource, getQuery("database.selectDevicesAll"))
.executeQuery(Device.class);