handler/PadMessageHandler.js: shuffle around some comments

No functional changes
pull/3587/head
muxator 2019-03-27 00:05:54 +01:00 committed by muxator
parent 7a5470c7bd
commit b8df6ca60c
1 changed files with 4 additions and 4 deletions

View File

@ -257,8 +257,8 @@ 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") {
// client tried to auth for the first time (first msg from the client)
createSessionInfo(client, message);
}
@ -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;
}