aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/Main.hx
diff options
context:
space:
mode:
authorRemi <6680627+riseremi@users.noreply.github.com>2025-04-07 19:58:46 +0500
committerGitHub <noreply@github.com>2025-04-07 17:58:46 +0300
commitf61717fcc48fe7039cab5e183da29653e445f691 (patch)
treeb1c03132d9e76554f898b82c02a5987e40388917 /src/server/Main.hx
parentf874dcd3de368e7e512ab1c0defdd17bc3026ce5 (diff)
Ask to create admin user on fresh install (#62)
* Ask to create admin user on fresh install * Implement client form submitting * minimize diff, simplify impl * Check json typing and clean stuff --------- Co-authored-by: RblSb <msrblsb@gmail.com>
Diffstat (limited to 'src/server/Main.hx')
-rw-r--r--src/server/Main.hx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/Main.hx b/src/server/Main.hx
index d935157..61cb46b 100644
--- a/src/server/Main.hx
+++ b/src/server/Main.hx
@@ -31,6 +31,8 @@ private typedef MainOptions = {
}
class Main {
+ public static inline var MIN_PASSWORD_LENGTH = 4;
+ public static inline var MAX_PASSWORD_LENGTH = 50;
static inline var VIDEO_START_MAX_DELAY = 3000;
static inline var VIDEO_SKIP_DELAY = 1000;
static inline var FLASHBACKS_COUNT = 50;
@@ -42,8 +44,8 @@ class Main {
public final userDir:String;
public final logsDir:String;
public final config:Config;
+ public final isNoState:Bool;
- final isNoState:Bool;
final verbose:Bool;
final statePath:String;
var wss:WSServer;
@@ -370,6 +372,10 @@ class Main {
trace('Admin $name removed.');
}
+ public function hasAdmins():Bool {
+ return userList.admins.length > 0;
+ }
+
public function replayLog(events:Array<ServerEvent>):Void {
final timer = new Timer(1000);
timer.run = () -> {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage