1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

All feature state access through config API (#2785)

This commit is contained in:
Matt Bishop
2023-03-10 08:11:11 -05:00
committed by GitHub
parent efe7ae8d07
commit bd666841a5
8 changed files with 159 additions and 5 deletions

View File

@ -1,4 +1,6 @@
namespace Bit.Core;
using System.Reflection;
namespace Bit.Core;
public static class Constants
{
@ -26,4 +28,12 @@ public static class AuthenticationSchemes
public static class FeatureFlagKeys
{
public const string SecretsManager = "secrets-manager";
public static List<string> GetAllKeys()
{
return typeof(FeatureFlagKeys).GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy)
.Where(fi => fi.IsLiteral && !fi.IsInitOnly && fi.FieldType == typeof(string))
.Select(x => (string)x.GetRawConstantValue())
.ToList();
}
}