diff options
| author | Remi <6680627+riseremi@users.noreply.github.com> | 2025-04-07 19:58:46 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-07 17:58:46 +0300 |
| commit | f61717fcc48fe7039cab5e183da29653e445f691 (patch) | |
| tree | b1c03132d9e76554f898b82c02a5987e40388917 /src/server/Main.hx | |
| parent | f874dcd3de368e7e512ab1c0defdd17bc3026ce5 (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.hx | 8 |
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 = () -> { |
