mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01:00
[PM-5237] Add new Settings property to config endpoint (#4785)
* Added new Settings property to Config endpoint. * Linting
This commit is contained in:
parent
f72932bf24
commit
5c9da2e5ea
@ -11,6 +11,7 @@ public class ConfigResponseModel : ResponseModel
|
||||
public ServerConfigResponseModel Server { get; set; }
|
||||
public EnvironmentConfigResponseModel Environment { get; set; }
|
||||
public IDictionary<string, object> 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<string, object>();
|
||||
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; }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user