ghost file depends on base dir
This commit is contained in:
@@ -58,6 +58,7 @@ let assert = require('assert'),
|
||||
groups = require('./groups.js'),
|
||||
hat = require('./hat.js'),
|
||||
mailer = require('./mailer.js'),
|
||||
paths = require('./paths.js'),
|
||||
qrcode = require('qrcode'),
|
||||
safe = require('safetydance'),
|
||||
settings = require('./settings.js'),
|
||||
@@ -209,7 +210,7 @@ function verifyGhost(username, password) {
|
||||
assert.strictEqual(typeof username, 'string');
|
||||
assert.strictEqual(typeof password, 'string');
|
||||
|
||||
var ghostData = safe.JSON.parse(safe.fs.readFileSync(constants.GHOST_USER_FILE, 'utf8'));
|
||||
var ghostData = safe.JSON.parse(safe.fs.readFileSync(paths.GHOST_USER_FILE, 'utf8'));
|
||||
if (!ghostData) return false;
|
||||
|
||||
if (username in ghostData && ghostData[username] === password) {
|
||||
|
||||
Reference in New Issue
Block a user