Move permissions into JS init script & socket
No need for an AJAX request that might produce a race condition.
This commit is contained in:
1 parent
bf8301bd6a
commit
bd95dad85e
11 files changed
+59
-74
No files matched your search
@@ -14,7 +14,7 @@ from octoprint.server.util.flask import restricted_access, get_json_command_from
|
||||
from octoprint.access.permissions import Permissions
|
||||
|
||||
@api.route("/connection", methods=["GET"])
|
||||
@Permissions.CONNECTION_ACCESS.require(403)
|
||||
@Permissions.STATUS.require(403)
|
||||
def connectionState():
|
||||
state, port, baudrate, printer_profile = printer.get_current_connection()
|
||||
current = {
|
||||
|
||||
Reference in new issue
Block a user