Skip to content

Commit

Permalink
STRICT CHECK NOT PRESENT IN RAY's WORK. Should be there for coherency?
Browse files Browse the repository at this point in the history
  • Loading branch information
muxator committed Mar 2, 2019
1 parent d520e28 commit 8ecd0dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/node/db/AuthorManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function mapAuthorWithDBKey (mapperkey, mapper, callback)
db.get(mapperkey + ":" + mapper, function(err, author) {
if (ERR(err, callback)) return;

if (author == null) {
if (author === null) {
// there is no author with this mapper, so create one
exports.createAuthor(null, function(err, author) {
if (ERR(err, callback)) return;
Expand Down
6 changes: 3 additions & 3 deletions src/node/db/SecurityManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ exports.checkAccess = function(padID, sessionCookie, token, password, callback)

// --> grant access
statusObject = { accessStatus: "grant", authorID: sessionAuthor };
} else if (isPasswordProtected && passwordStatus == "correct") {
} else if (isPasswordProtected && passwordStatus === "correct") {
// - the pad is password protected and password is correct

// --> grant access
Expand All @@ -235,7 +235,7 @@ exports.checkAccess = function(padID, sessionCookie, token, password, callback)

// --> deny access, ask for new password and tell them that the password is wrong
statusObject = { accessStatus: "wrongPassword" };
} else if (isPasswordProtected && passwordStatus == "notGiven") {
} else if (isPasswordProtected && passwordStatus === "notGiven") {
// - the pad is password protected but no password given

// --> ask for password
Expand Down Expand Up @@ -271,7 +271,7 @@ exports.checkAccess = function(padID, sessionCookie, token, password, callback)

// --> deny access, ask for new password and tell them that the password is wrong
statusObject = {accessStatus: "wrongPassword"};
} else if (isPublic && isPasswordProtected && passwordStatus == "notGiven") {
} else if (isPublic && isPasswordProtected && passwordStatus === "notGiven") {
// - it's public and the pad is password protected but no password given

// --> ask for password
Expand Down

0 comments on commit 8ecd0dd

Please sign in to comment.