feat: add character detail page with public access (#59)#112
Merged
pierrick-fonquerne merged 2 commits intodevelopfrom Feb 16, 2026
Hidden character warning
The head ref may contain hidden characters: "59-d\u00e9tails-dun-personnage"
Merged
feat: add character detail page with public access (#59)#112pierrick-fonquerne merged 2 commits intodevelopfrom
pierrick-fonquerne merged 2 commits intodevelopfrom
Conversation
Make GetById endpoint accessible without authentication via [AllowAnonymous]. Owner sees all their characters (any status), anonymous/other users see only approved+shared, otherwise 404 (hides character existence for security). Add IsOwner boolean to CharacterResponse DTO to avoid exposing raw userId.
Add CharacterDetailPage at /characters/:id with owner and anonymous views. Owner sees edit button and shared indicator, anonymous sees read-only view. Extract CLASS_ICONS into shared utility for reuse across ClassSelector and detail page. Add getCharacterPublic service with conditional auth. 18 tests covering all scenarios including accessibility.
Closed
7 tasks
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /characters/{id}accessible sans authentification via[AllowAnonymous]. Le propriétaire voit tous ses personnages (tout statut), les anonymes/autres ne voient que les approuvés+partagés, sinon 404 (masque l'existence du personnage). Ajout deIsOwnerau DTO pour éviter d'exposer le userId brut.CharacterDetailPageà/characters/:idavec vue propriétaire (bouton Modifier, indicateur Partagé/Privé) et vue anonyme (lecture seule). Icônes de classe SVG extraites dans un utilitaire partagé (ClassIcons.tsx) réutilisé parClassSelectoret la page détail.Test plan
Closes #59