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:
parent
97b350be2d
commit
b157dce4e4
54 changed files with 12996 additions and 50 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,6 +8,25 @@ namespace Yavsc.Org.Tests.Controllers;
|
|||
|
||||
public sealed class ResourceUsageTermsTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task Privacy_describes_withdrawal_payment_exception_and_actual_recipients()
|
||||
{
|
||||
using var factory = new TestWebApplicationFactory();
|
||||
using var client = factory.CreateClient();
|
||||
var response = await client.GetAsync("/Home/Privacy", TestContext.Current.CancellationToken);
|
||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||
var html = await response.Content.ReadAsStringAsync(TestContext.Current.CancellationToken);
|
||||
Assert.Contains("un an", html);
|
||||
Assert.Contains("retrait effectif", html);
|
||||
Assert.Contains("comptables", html);
|
||||
Assert.Contains("PayPal", html);
|
||||
Assert.Contains("Anthropic", html);
|
||||
Assert.Contains("OAuth", html);
|
||||
Assert.Contains("PostIt", html);
|
||||
Assert.DoesNotContain("Aucune information", html);
|
||||
Assert.DoesNotContain("mise en œuvre immédiate", html);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Public_terms_describe_the_configured_rule_and_are_linked_from_the_footer()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue