yavsc/src/Yavsc.Blogs.Tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul Schneider a307885310
Blogs: list personal files under the user's login, not the sub claim
GET api/v1/fs passed User.GetUserId() (the "sub" claim — a GUID in
production) to GetUserFiles, so the listing looked under
{Blog}/{sub-GUID}. But the personal-storage tree is keyed by the
user's login everywhere else: EnsureDestinationDirectory writes under
{Blog}/{name-claim}, the download endpoint and avatar paths use
user.UserName. So once the upload path was fixed (previous commit),
files landed under {Blog}/{login} while the listing still looked under
{Blog}/{GUID} — an empty tree — hence the PostIt "Mes fichiers" page
listing nothing.

GetDir now resolves the user from the DB (as Post already does) and
lists under user.UserName. UploadedFile.OwnerId stays "sub", so
EnrichWithFileIds still queries by uid.

Tests:
- TestTokenIssuer.Issue gains an optional `name` param (defaults to
  subject, preserving existing behavior) so a test token can mirror
  production where sub (GUID) ≠ name (login).
- FileSystemApiTests.Get_fs_lists_files_stored_under_the_user_login
  decouples sub from the login, uploads under the login, and asserts
  GET /api/v1/fs returns the file (and the subject-named directory does
  NOT exist). Verified to fail when the controller uses uid for the
  listing.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-25 20:50:58 +01:00
..
Fixtures nuget referencezs updated 2026-09-20 01:53:20 +01:00
BlogAclApiTests.cs refacto publication 2026-09-19 21:46:08 +01:00
BlogApiMappedClaimsTests.cs test(blogs): configure SiteSettings.Blog in MappedClaimsBlogsWebServerFixture 2026-09-19 14:14:28 +01:00
BlogApiSmokeTests.cs using clauses cleanup 2026-08-22 03:34:48 +01:00
BlogApiTests.cs -Config.Temp 2026-09-18 11:13:44 +01:00
BlogSpotServiceIndexTests.cs Publish, bug fix 2026-09-19 22:20:52 +01:00
CircleMembersApiTests.cs tests(blogs): pass TestContext.Current.CancellationToken to HTTP calls 2026-08-22 03:45:59 +01:00
CreateMultipartContentTests.cs test: cover BlogApiClient.CreateMultipartContent shape + server round-trip 2026-09-18 11:39:45 +01:00
FileSystemApiTests.cs Blogs: list personal files under the user's login, not the sub claim 2026-09-25 20:50:58 +01:00
IBlogPostWireShapeTests.cs IBlogPost porte IsPublished : le endpoint liste ne le lâche plus sur le wire 2026-09-25 15:11:25 +01:00
JwtClaimMappingCollection.cs using clauses cleanup 2026-08-22 03:34:48 +01:00
PublishEndpointTests.cs fixes the tests 2026-08-28 22:41:05 +01:00
Yavsc.Blogs.Tests.csproj CHANGELOG: add 1.0.8-rc17 section 2026-09-25 18:42:01 +01:00