From 0f748992a86769272a33f67b89fa97b95808d060 Mon Sep 17 00:00:00 2001 From: Layla Manley Date: Sun, 8 Oct 2023 04:59:38 -0400 Subject: [PATCH] iteration --- packages/auth_server.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/auth_server.lua b/packages/auth_server.lua index 073e432..3f821d4 100644 --- a/packages/auth_server.lua +++ b/packages/auth_server.lua @@ -76,6 +76,12 @@ while true do data.users[request.username] = { password = convert_password(request.password) } + + -- if only user in database, add to admin group + if table.getn(data.users) == 1 then + data.users[request.username].groups = {} + data.users[request.username].groups["admin"] = true + end save_data()