handler/PadMessageHandler.js: shuffle around some comments
No functional changespull/3587/head
parent
7a5470c7bd
commit
b8df6ca60c
|
@ -257,8 +257,8 @@ exports.handleMessage = async function(client, message)
|
||||||
|
|
||||||
// check permissions
|
// check permissions
|
||||||
|
|
||||||
// client tried to auth for the first time (first msg from the client)
|
|
||||||
if (message.type == "CLIENT_READY") {
|
if (message.type == "CLIENT_READY") {
|
||||||
|
// client tried to auth for the first time (first msg from the client)
|
||||||
createSessionInfo(client, message);
|
createSessionInfo(client, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,15 +285,15 @@ exports.handleMessage = async function(client, message)
|
||||||
// check if pad is requested via readOnly
|
// check if pad is requested via readOnly
|
||||||
let padId = auth.padID;
|
let padId = auth.padID;
|
||||||
|
|
||||||
// Pad is readOnly, first get the real Pad ID
|
|
||||||
if (padId.indexOf("r.") === 0) {
|
if (padId.indexOf("r.") === 0) {
|
||||||
|
// Pad is readOnly, first get the real Pad ID
|
||||||
padId = await readOnlyManager.getPadId(padID);
|
padId = await readOnlyManager.getPadId(padID);
|
||||||
}
|
}
|
||||||
|
|
||||||
let { accessStatus } = await securityManager.checkAccess(padId, auth.sessionID, auth.token, auth.password);
|
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") {
|
if (accessStatus !== "grant") {
|
||||||
|
// no access, send the client a message that tells him why
|
||||||
client.json.send({ accessStatus });
|
client.json.send({ accessStatus });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue