version bump
- new homepage theme inspired by @GraspYonOx - connect setup also mostly by @GraspYonOx - some 'fixes' regarding module unloading, hopefully fixing call stack issue - fixes to wtvshared.isAdmin() to not show log as if it was an access attempt
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,7 +95,11 @@ 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) {
|
||||
|
||||
@@ -72,6 +72,14 @@ class WTVShared {
|
||||
return src;
|
||||
}
|
||||
|
||||
isAdmin(wtvclient, service_name = "wtv-admin") {
|
||||
var WTVAdmin = require("./WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(this.minisrv_config, wtvclient, service_name);
|
||||
var result = wtva.isAuthorized(true);
|
||||
wtva, WTVAdmin = null;
|
||||
return result;
|
||||
}
|
||||
|
||||
parseJSON(json) {
|
||||
if (!json) return null;
|
||||
if (typeof json !== 'string') json = json.toString();
|
||||
@@ -912,12 +920,6 @@ class WTVShared {
|
||||
});
|
||||
return outdata;
|
||||
}
|
||||
|
||||
isAdmin(wtvclient, service_name = "wtv-admin") {
|
||||
var WTVAdmin = require("./WTVAdmin.js");
|
||||
var wtva = new WTVAdmin(this.minisrv_config, wtvclient, service_name);
|
||||
return (wtva.isAuthorized() === true) ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
class clientShowAlert {
|
||||
|
||||
Reference in New Issue
Block a user