diff --git a/src/Tgstation.Server.Api/Models/Internal/ServerInformation.cs b/src/Tgstation.Server.Api/Models/Internal/ServerInformation.cs
index 0c6768e53a..21f4ed26eb 100644
--- a/src/Tgstation.Server.Api/Models/Internal/ServerInformation.cs
+++ b/src/Tgstation.Server.Api/Models/Internal/ServerInformation.cs
@@ -1,4 +1,4 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace Tgstation.Server.Api.Models.Internal
{
@@ -22,6 +22,11 @@ namespace Tgstation.Server.Api.Models.Internal
///
public uint UserLimit { get; set; }
+ ///
+ /// The maximum number of s allowed.
+ ///
+ public uint UserGroupLimit { get; set; }
+
///
/// Limits the locations instances may be created or attached from.
///
diff --git a/src/Tgstation.Server.Host/Configuration/GeneralConfiguration.cs b/src/Tgstation.Server.Host/Configuration/GeneralConfiguration.cs
index e58c8d036e..766e4d4cd4 100644
--- a/src/Tgstation.Server.Host/Configuration/GeneralConfiguration.cs
+++ b/src/Tgstation.Server.Host/Configuration/GeneralConfiguration.cs
@@ -43,6 +43,11 @@ namespace Tgstation.Server.Host.Configuration
///
const uint DefaultUserLimit = 100;
+ ///
+ /// The default value for .
+ ///
+ const uint DefaultUserGroupLimit = 25;
+
///
/// The default value for
///
@@ -102,6 +107,7 @@ namespace Tgstation.Server.Host.Configuration
MinimumPasswordLength = DefaultMinimumPasswordLength;
InstanceLimit = DefaultInstanceLimit;
UserLimit = DefaultUserLimit;
+ UserGroupLimit = DefaultUserGroupLimit;
}
///
diff --git a/src/Tgstation.Server.Host/Controllers/HomeController.cs b/src/Tgstation.Server.Host/Controllers/HomeController.cs
index 23a539405e..e08e0cde15 100644
--- a/src/Tgstation.Server.Host/Controllers/HomeController.cs
+++ b/src/Tgstation.Server.Host/Controllers/HomeController.cs
@@ -191,6 +191,7 @@ namespace Tgstation.Server.Host.Controllers
MinimumPasswordLength = generalConfiguration.MinimumPasswordLength,
InstanceLimit = generalConfiguration.InstanceLimit,
UserLimit = generalConfiguration.UserLimit,
+ UserGroupLimit = generalConfiguration.UserGroupLimit,
ValidInstancePaths = generalConfiguration.ValidInstancePaths,
WindowsHost = platformIdentifier.IsWindows,
SwarmServers = swarmService.GetSwarmServers(),
diff --git a/src/Tgstation.Server.Host/appsettings.json b/src/Tgstation.Server.Host/appsettings.json
index b0df570838..efc04c7461 100644
--- a/src/Tgstation.Server.Host/appsettings.json
+++ b/src/Tgstation.Server.Host/appsettings.json
@@ -8,6 +8,7 @@
"ApiPort": 5000,
"UseBasicWatchdog": false,
"UserLimit": 100,
+ "UserGroupLimit": 25,
"InstanceLimit": 10,
"ValidInstancePaths": null,
"HostApiDocumentation": false
diff --git a/tests/Tgstation.Server.Tests/RootTest.cs b/tests/Tgstation.Server.Tests/RootTest.cs
index f3fd6feb68..705269c9cf 100644
--- a/tests/Tgstation.Server.Tests/RootTest.cs
+++ b/tests/Tgstation.Server.Tests/RootTest.cs
@@ -162,6 +162,7 @@ namespace Tgstation.Server.Tests
Assert.AreEqual(10U, serverInfo.MinimumPasswordLength);
Assert.AreEqual(11U, serverInfo.InstanceLimit);
Assert.AreEqual(150U, serverInfo.UserLimit);
+ Assert.AreEqual(47U, serverInfo.UserGroupLimit);
Assert.AreEqual(RuntimeInformation.IsOSPlatform(OSPlatform.Windows), serverInfo.WindowsHost);
//check that modifying the token even slightly fucks up the auth
diff --git a/tests/Tgstation.Server.Tests/TestingServer.cs b/tests/Tgstation.Server.Tests/TestingServer.cs
index f9c888e341..12f04a0b1b 100644
--- a/tests/Tgstation.Server.Tests/TestingServer.cs
+++ b/tests/Tgstation.Server.Tests/TestingServer.cs
@@ -80,6 +80,7 @@ namespace Tgstation.Server.Tests
String.Format(CultureInfo.InvariantCulture, "General:MinimumPasswordLength={0}", 10),
String.Format(CultureInfo.InvariantCulture, "General:InstanceLimit={0}", 11),
String.Format(CultureInfo.InvariantCulture, "General:UserLimit={0}", 150),
+ String.Format(CultureInfo.InvariantCulture, "General:UserGroupLimit={0}", 47),
String.Format(CultureInfo.InvariantCulture, "General:HostApiDocumentation={0}", DumpOpenApiSpecpath),
String.Format(CultureInfo.InvariantCulture, "FileLogging:Directory={0}", Path.Combine(Directory, "Logs")),
String.Format(CultureInfo.InvariantCulture, "FileLogging:LogLevel={0}", "Trace"),