fix(api): harden billing/blog validation and update rc14 changelog
All checks were successful
Dotnet build and test / build (pull_request) Successful in 9m35s

This commit is contained in:
Paul Schneider 2026-09-06 19:16:41 +01:00
commit d65624bfb8
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
13 changed files with 168 additions and 53 deletions

View file

@ -82,19 +82,17 @@ public class HairCutQueryApiController : Controller
public async Task<IActionResult> PostQuery([FromBody] HairCutQuery query, CancellationToken cancellationToken)
{
var uid = User.GetUserId();
if (string.IsNullOrWhiteSpace(query.ClientId))
{
query.ClientId = uid;
}
query.ClientId = uid;
ModelState.Remove("Client");
ModelState.Remove("ClientId");
ModelState.Remove("UserCreated");
ModelState.Remove("UserModified");
ModelState.Remove("SelectedProfile");
ModelState.Remove("Prestation");
if (query.ClientId != uid && !User.IsInRole(Constants.AdminGroupName))
{
ModelState.AddModelError("ClientId", "You can only create your own HairCutQuery");
return BadRequest(ModelState);
}
ModelState.Remove("PerformerProfile");
ModelState.Remove("Context");
ModelState.Remove("Regularization");
query.Prestation = await _context.HairPrestation
.SingleOrDefaultAsync(p => p.Id == query.PrestationId, cancellationToken);