aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/web/ConsoleServlet.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/org/traccar/web/ConsoleServlet.java b/src/org/traccar/web/ConsoleServlet.java
index b219eaba4..c1ab7c468 100644
--- a/src/org/traccar/web/ConsoleServlet.java
+++ b/src/org/traccar/web/ConsoleServlet.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,10 +40,16 @@ public class ConsoleServlet extends WebServlet {
+ Context.getConfig().getString("database.url") + "|"
+ Context.getConfig().getString("database.user"));
- Method method = org.h2.server.web.WebServer.class.getDeclaredMethod("updateSetting", ConnectionInfo.class);
+ Method method;
+
+ method = org.h2.server.web.WebServer.class.getDeclaredMethod("updateSetting", ConnectionInfo.class);
method.setAccessible(true);
method.invoke(server, connectionInfo);
+ method = org.h2.server.web.WebServer.class.getDeclaredMethod("setAllowOthers", boolean.class);
+ method.setAccessible(true);
+ method.invoke(server, true);
+
} catch (NoSuchFieldException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
Log.warning(e);
}