develop #41

Merged
eliott merged 6 commits from develop into main 2026-05-20 09:03:50 +02:00
Owner
No description provided.
The middleware was silently mapping any unhandled exception to 500 with
no log line, which made debugging real failures (e.g. an S3 PutObject
throwing NoSuchBucket) impossible from the API's stdout. Inject
ILogger<ErrorHandlingMiddleware> and LogError on >=500 so the stack
trace surfaces in `dotnet run`.
SeaweedFS does not auto-create buckets on PutObject — a fresh dev or
prod deployment with SEAWEEDFS_S3_BUCKET set to a name that was never
manually CreateBucket'd fails every upload with NoSuchBucket. The
controller's error middleware then maps this to a generic 500 ("Une
erreur est survenue" on the frontend).

Add a lazy, thread-safe EnsureBucketAsync() that runs once on the first
UploadAsync call. PutBucketAsync is idempotent on its happy path, and
BucketAlreadyOwnedByYou / BucketAlreadyExists are swallowed in case
something else provisioned the bucket between deployment and first
write. Guarded with a SemaphoreSlim so concurrent first-uploads do not
race the create.

No new dependencies; no migration touched.
Reviewed-on: #40
Unverified users can now log in but receive a restricted permission mask
(ResourcesRead only) instead of being blocked at the door. Comment endpoints
are gated on ResourcesCreate so the mask still prevents writes. Adds two
resend-verification endpoints (public-by-email and authed-for-self) and an
email_verified JWT claim. Login and refresh now also return tokens in the
response body so React Native clients (which can't reliably forward HttpOnly
cookies) can authenticate. Registration moves to a single transactional
CreateWithRolesAsync to avoid orphan Users rows.
eliott merged commit 5bfe6fbd18 into main 2026-05-20 09:03:50 +02:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cda-solutions/resources-relationnelles-api!41
No description provided.