Added settings model, added settings migration, added LDAP salted hashes

This commit is contained in:
2025-11-02 13:39:28 +01:00
parent 0a6413d106
commit 5b5fcd6322
5 changed files with 123 additions and 16 deletions

View File

@@ -0,0 +1,19 @@
using System.Security.Cryptography;
using System.Text.Json;
namespace Berufsschule_HAM.Models;
public class AdminSettingsModel
{
public required string DefaultHashAlgorithm { get; set; }
public int MaxDownloadableUserImageSize { get; set; }
public required string BarcodeType { get; set; }
public required string BarcodeText { get; set; }
public required Dictionary<string, Preset> Presets { get; set; }
public HashAlgorithm? hashAlgorithm;
}
public class Preset
{
public required Dictionary<string, string> Attribute { get; set; }
}

View File

@@ -13,5 +13,6 @@ public class LdapConfig
public string UsersOu { get; set; } = "ou=users";
public string GroupsOu { get; set; } = "ou=groups";
public string MigrationsOu { get; set; } = "ou=migrations";
public string SettingsOu { get; set; } = "ou=settings";
public int ConnectionRetryCount { get; set; } = 10;
}