mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 14:47:12 -04:00
db/SecurityManager: use jshint
This commit is contained in:
parent
d63b7cf188
commit
8f208ca444
1 changed files with 27 additions and 27 deletions
|
@ -24,7 +24,7 @@ var async = require("async");
|
||||||
var authorManager = require("./AuthorManager");
|
var authorManager = require("./AuthorManager");
|
||||||
var padManager = require("./PadManager");
|
var padManager = require("./PadManager");
|
||||||
var sessionManager = require("./SessionManager");
|
var sessionManager = require("./SessionManager");
|
||||||
var settings = require("../utils/Settings")
|
var settings = require("../utils/Settings");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function controlls the access to a pad, it checks if the user can access a pad.
|
* This function controlls the access to a pad, it checks if the user can access a pad.
|
||||||
|
@ -81,7 +81,7 @@ exports.checkAccess = function (padID, sessionID, token, password, callback)
|
||||||
// grant access, with author of token
|
// grant access, with author of token
|
||||||
callback(null, statusObject);
|
callback(null, statusObject);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
//don't continue
|
//don't continue
|
||||||
return;
|
return;
|
||||||
|
@ -95,7 +95,7 @@ exports.checkAccess = function (padID, sessionID, token, password, callback)
|
||||||
var tokenAuthor;
|
var tokenAuthor;
|
||||||
var isPublic;
|
var isPublic;
|
||||||
var isPasswordProtected;
|
var isPasswordProtected;
|
||||||
var passwordStatus = password == null ? "notGiven" : "wrong"; // notGiven, correct, wrong
|
var passwordStatus = password === null ? "notGiven" : "wrong"; // notGiven, correct, wrong
|
||||||
|
|
||||||
async.series([
|
async.series([
|
||||||
//get basic informations from the database
|
//get basic informations from the database
|
||||||
|
@ -156,7 +156,7 @@ exports.checkAccess = function (padID, sessionID, token, password, callback)
|
||||||
function(callback)
|
function(callback)
|
||||||
{
|
{
|
||||||
//skip this if the pad doesn't exists
|
//skip this if the pad doesn't exists
|
||||||
if(padExists == false)
|
if(!padExists)
|
||||||
{
|
{
|
||||||
callback();
|
callback();
|
||||||
return;
|
return;
|
||||||
|
@ -275,4 +275,4 @@ exports.checkAccess = function (padID, sessionID, token, password, callback)
|
||||||
if(ERR(err, callback)) return;
|
if(ERR(err, callback)) return;
|
||||||
callback(null, statusObject);
|
callback(null, statusObject);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue