aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database/PermissionsManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2022-02-13 23:34:25 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2022-02-13 23:34:25 -0800
commit1c73bae2e23242673e0a07cdbc2493700f134ceb (patch)
treed1105368628b5f64fabb657682df58f1641e4d54 /src/main/java/org/traccar/database/PermissionsManager.java
parentde110b28ce8adb6ba875d88ede6e8f86dae4dd48 (diff)
downloadtrackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.tar.gz
trackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.tar.bz2
trackermap-server-1c73bae2e23242673e0a07cdbc2493700f134ceb.zip
New storage implementation
Diffstat (limited to 'src/main/java/org/traccar/database/PermissionsManager.java')
-rw-r--r--src/main/java/org/traccar/database/PermissionsManager.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/database/PermissionsManager.java b/src/main/java/org/traccar/database/PermissionsManager.java
index ab841a521..2bb808033 100644
--- a/src/main/java/org/traccar/database/PermissionsManager.java
+++ b/src/main/java/org/traccar/database/PermissionsManager.java
@@ -33,8 +33,8 @@ import org.traccar.model.Order;
import org.traccar.model.Permission;
import org.traccar.model.Server;
import org.traccar.model.User;
+import org.traccar.storage.StorageException;
-import java.sql.SQLException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -156,7 +156,7 @@ public class PermissionsManager {
public void refreshServer() {
try {
server = dataManager.getServer();
- } catch (SQLException error) {
+ } catch (StorageException error) {
LOGGER.warn("Refresh server config error", error);
}
}
@@ -193,7 +193,7 @@ public class PermissionsManager {
}
}
- } catch (SQLException | ClassNotFoundException error) {
+ } catch (StorageException | ClassNotFoundException error) {
LOGGER.warn("Refresh device permissions error", error);
}
@@ -499,12 +499,12 @@ public class PermissionsManager {
return server;
}
- public void updateServer(Server server) throws SQLException {
+ public void updateServer(Server server) throws StorageException {
dataManager.updateObject(server);
this.server = server;
}
- public User login(String email, String password) throws SQLException {
+ public User login(String email, String password) throws StorageException {
User user = dataManager.login(email, password);
if (user != null) {
checkUserEnabled(user.getId());