summaryrefslogtreecommitdiff
path: root/backend/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/main.py')
-rw-r--r--backend/main.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/backend/main.py b/backend/main.py
index a5730fbd..41ecfc77 100644
--- a/backend/main.py
+++ b/backend/main.py
@@ -18,6 +18,7 @@ from injector import inject_to_tab, tab_has_global_var
from loader import Loader
from updater import Updater
from utilities import Utilities
+from settings import SettingsManager
# Ensure USER and GROUP vars are set first.
# TODO: This isn't the best way to do this but supports the current
@@ -48,9 +49,6 @@ async def chown_plugin_dir(_):
if code_chown != 0 or code_chmod != 0:
logger.error(f"chown/chmod exited with a non-zero exit code (chown: {code_chown}, chmod: {code_chmod})")
-def remote_debugging_allowed():
- return path.exists(HOMEBREW_PATH + "/allow_remote_debugging")
-
class PluginManager:
def __init__(self) -> None:
self.loop = get_event_loop()
@@ -62,6 +60,7 @@ class PluginManager:
})
self.plugin_loader = Loader(self.web_app, CONFIG["plugin_path"], self.loop, CONFIG["live_reload"])
self.plugin_browser = PluginBrowser(CONFIG["plugin_path"], self.web_app, self.plugin_loader.plugins)
+ self.settings = SettingsManager("loader", path.join(HOMEBREW_PATH, "settings"))
self.utilities = Utilities(self)
self.updater = Updater(self)
@@ -70,7 +69,7 @@ class PluginManager:
self.web_app.on_startup.append(chown_plugin_dir)
self.loop.create_task(self.loader_reinjector())
self.loop.create_task(self.load_plugins())
- if not remote_debugging_allowed():
+ if not self.settings.getSetting("cef_forward", False):
self.loop.create_task(stop_systemd_unit(REMOTE_DEBUGGER_UNIT))
self.loop.set_exception_handler(self.exception_handler)
self.web_app.add_routes([get("/auth/token", self.get_auth_token)])