diff --git a/packages/auth.lua b/packages/auth.lua index 1ad4d1d..7b4f434 100644 --- a/packages/auth.lua +++ b/packages/auth.lua @@ -111,5 +111,22 @@ elseif action == "group" then end local result = auth.add_user_to_group(target_user, group) + elseif subaction == "check" then + local target_user = args[3] + local group = args[4] + if target_user == nil or group == nil then + io.write("Usage: auth group check \n") + return + end + + local result = auth.check_user_in_group(target_user, group) + if result then + io.write("User " .. target_user .. " is in group " .. group .. "\n") + else + io.write("User " .. target_user .. " is not in group " .. group .. "\n") + end + else + io.write("Usage: auth group \n") + return end end \ No newline at end of file