backend + web: Set passwords through email confirmation

This commit is contained in:
GonnaHetzMe committed 2026-12-04 20:14:00 +01:00
1 parent bd8eb65e56
commit ee5f1d3d10
23 files changed
+281 -110

No files matched your search

@@ -1,6 +1,5 @@
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using Helpdesk.Web.Api;
using Helpdesk.Web.Auth;
using Microsoft.AspNetCore.Mvc.Testing;
@@ -213,7 +212,6 @@ public sealed class AdminUsersTests
["LastName"] = "Novák",
["Email"] = "[email protected]",
["Role"] = UserRoles.Student,
["Password"] = "Initial-password",
["IsActive"] = "true",
["EmailConfirmed"] = "false",
});
@@ -269,13 +267,6 @@ public sealed class AdminUsersTests
Assert.Contains("value=\"STUDENT\" selected=\"selected\"", html);
}
private static string AntiforgeryToken(string html)
{
var token = Regex.Match(html, "name=\"__RequestVerificationToken\"[^>]*value=\"([^\"]+)\"").Groups[1].Value;
Assert.NotEmpty(token);
return token;
}
private static WebApplicationFactory<Program> CreateApplication(AdminUsersBackend backend) =>
new WebApplicationFactory<Program>().WithWebHostBuilder(builder =>
builder.ConfigureTestServices(services => services.AddHttpClient(nameof(HelpdeskApiClient))