v0.9.36
- BREAKING CHANGE from v0.9.35 and eariler: Move accounts into subfolder of SessionStore - viewergen and viewer updates from @GraspYonOx - new homepage theme inspired by @GraspYonOx - connect setup also mostly by @GraspYonOx - numerous bug fixes - nntp-server-zefie is now on npmjs - implement proper nodejs debugging - will start to phase out using console.log for actual debugging - existing "debug" (verbose) messages will stay as is - future code debugging will use debug() to debug WIP, therefore not showing to most users if it is accidently left in
This commit is contained in:
@@ -72,7 +72,7 @@ class WTVAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
isAuthorized() {
|
||||
isAuthorized(justchecking = false) {
|
||||
var allowed_ssid = false;
|
||||
var allowed_ip = false;
|
||||
if (this.minisrv_config.services[this.service_name].authorized_ssids) {
|
||||
@@ -95,11 +95,15 @@ class WTVAdmin {
|
||||
}
|
||||
});
|
||||
}
|
||||
return (allowed_ssid && allowed_ip) ? true : this.rejectConnection(!allowed_ssid);
|
||||
if (justchecking) {
|
||||
return (allowed_ssid && allowed_ip) ? true : false;
|
||||
} else {
|
||||
return (allowed_ssid && allowed_ip) ? true : this.rejectConnection(!allowed_ssid);
|
||||
}
|
||||
}
|
||||
|
||||
getAccountInfo(username, directory = null) {
|
||||
var search_dir = this.minisrv_config.config.SessionStore;
|
||||
var search_dir = this.minisrv_config.config.SessionStore + this.path.sep + "accounts";
|
||||
var account_data = null;
|
||||
var self = this;
|
||||
if (directory) search_dir = directory;
|
||||
@@ -114,7 +118,7 @@ class WTVAdmin {
|
||||
var temp_session_data = JSON.parse(temp_session_data_file);
|
||||
|
||||
if (temp_session_data.subscriber_username.toLowerCase() == username.toLowerCase()) {
|
||||
account_data = [temp_session_data, (search_dir + self.path.sep + file).replace(this.minisrv_config.config.SessionStore + this.path.sep, "").split(this.path.sep)[0]];
|
||||
account_data = [temp_session_data, (search_dir + self.path.sep + file).replace(this.minisrv_config.config.SessionStore + this.path.sep + "accounts", "").split(this.path.sep)[1]];
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(" # Error parsing Session Data JSON", search_dir + self.path.sep + file, e);
|
||||
|
||||
Reference in New Issue
Block a user