|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
const BatchRead = require("../batch-read");
|
|
|
|
|
const nThen = require("nthen");
|
|
|
|
|
const getFolderSize = require("get-folder-size");
|
|
|
|
|
const Util = require("../common-util");
|
|
|
|
|
//const Util = require("../common-util");
|
|
|
|
|
|
|
|
|
|
var Fs = require("fs");
|
|
|
|
|
|
|
|
|
@ -94,8 +94,8 @@ var getDiskUsage = function (Env, cb) {
|
|
|
|
|
|
|
|
|
|
Admin.command = function (Env, safeKey, data, cb, Server) {
|
|
|
|
|
var admins = Env.admins;
|
|
|
|
|
var unsafeKey = Util.unescapeKeyCharacters(safeKey);
|
|
|
|
|
if (admins.indexOf(unsafeKey) === -1) {
|
|
|
|
|
//var unsafeKey = Util.unescapeKeyCharacters(safeKey);
|
|
|
|
|
if (admins.indexOf(safeKey) === -1) {
|
|
|
|
|
return void cb("FORBIDDEN");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|