From b8df6ca60c717fd6275ea990c4ebafdff0d2540f Mon Sep 17 00:00:00 2001 From: muxator Date: Wed, 27 Mar 2019 00:05:54 +0100 Subject: [PATCH] handler/PadMessageHandler.js: shuffle around some comments No functional changes --- src/node/handler/PadMessageHandler.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index a4c672431..199c9528b 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -257,9 +257,9 @@ exports.handleMessage = async function(client, message) // check permissions - // client tried to auth for the first time (first msg from the client) if (message.type == "CLIENT_READY") { - createSessionInfo(client, message); + // client tried to auth for the first time (first msg from the client) + createSessionInfo(client, message); } // Note: message.sessionID is an entirely different kind of @@ -285,15 +285,15 @@ exports.handleMessage = async function(client, message) // check if pad is requested via readOnly let padId = auth.padID; - // Pad is readOnly, first get the real Pad ID if (padId.indexOf("r.") === 0) { + // Pad is readOnly, first get the real Pad ID padId = await readOnlyManager.getPadId(padID); } let { accessStatus } = await securityManager.checkAccess(padId, auth.sessionID, auth.token, auth.password); - // no access, send the client a message that tells him why if (accessStatus !== "grant") { + // no access, send the client a message that tells him why client.json.send({ accessStatus }); return; }