From 5c9da2e5eaa505a807da2c8897dfdc6c2e5327d3 Mon Sep 17 00:00:00 2001 From: Todd Martin <106564991+trmartin4@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:38:48 -0400 Subject: [PATCH] [PM-5237] Add new Settings property to config endpoint (#4785) * Added new Settings property to Config endpoint. * Linting --- src/Api/Models/Response/ConfigResponseModel.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Api/Models/Response/ConfigResponseModel.cs b/src/Api/Models/Response/ConfigResponseModel.cs index e560271c0..7328f1d16 100644 --- a/src/Api/Models/Response/ConfigResponseModel.cs +++ b/src/Api/Models/Response/ConfigResponseModel.cs @@ -11,6 +11,7 @@ public class ConfigResponseModel : ResponseModel public ServerConfigResponseModel Server { get; set; } public EnvironmentConfigResponseModel Environment { get; set; } public IDictionary FeatureStates { get; set; } + public ServerSettingsResponseModel Settings { get; set; } public ConfigResponseModel() : base("config") { @@ -18,6 +19,7 @@ public class ConfigResponseModel : ResponseModel GitHash = AssemblyHelpers.GetGitHash(); Environment = new EnvironmentConfigResponseModel(); FeatureStates = new Dictionary(); + Settings = new ServerSettingsResponseModel(); } public ConfigResponseModel( @@ -36,6 +38,10 @@ public class ConfigResponseModel : ResponseModel Sso = globalSettings.BaseServiceUri.Sso }; FeatureStates = featureStates; + Settings = new ServerSettingsResponseModel + { + DisableUserRegistration = globalSettings.DisableUserRegistration + }; } } @@ -54,3 +60,8 @@ public class EnvironmentConfigResponseModel public string Notifications { get; set; } public string Sso { get; set; } } + +public class ServerSettingsResponseModel +{ + public bool DisableUserRegistration { get; set; } +}