Add OBS podcast ingestion and account withdrawal privacy controls

Support scoped RTMPS publishing through MediaMTX, authenticated replay, resource accounting and PostIt activation/revocation. Close withdrawn accounts, erase managed files and purge eligible payment residues after one year. Include migrations, documentation and regression tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-11-08 07:43:15 +00:00
commit b157dce4e4
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
54 changed files with 12996 additions and 50 deletions

View file

@ -39,6 +39,21 @@ public sealed class ResourceSubscriptionControllerTests : IClassFixture<Resource
db.SaveChanges();
}
[Fact]
public async Task Withdrawal_requires_antiforgery_and_cannot_target_another_account()
{
using var client = _factory.SignedInClient();
using var missingToken = await client.PostAsync("/Account/Delete", new FormUrlEncodedContent(
new Dictionary<string, string> { ["UserId"] = "listener" }), Ct);
Assert.Equal(HttpStatusCode.BadRequest, missingToken.StatusCode);
using var tampered = await PostAsync(client, "/Account/Delete", new() { ["UserId"] = "author" });
Assert.Equal(HttpStatusCode.Redirect, tampered.StatusCode);
Assert.Contains("AccessDenied", tampered.Headers.Location?.ToString());
using var scope = _factory.Services.CreateScope();
Assert.Null((await scope.ServiceProvider.GetRequiredService<ApplicationDbContext>()
.Users.SingleAsync(u => u.Id == "author", Ct)).WithdrawalRequestedAt);
}
[Fact]
public async Task Subscription_management_requires_login_and_all_mutations_require_antiforgery()
{