Account and comment management#40
Merged
Merged
Conversation
…l modal on the profile page. Introduces the hexagonal update flow (ports, service, adapters) and a new POST /profile/email route. The profile shows the email with an Edit button opening the modal. CSS + `profile-email.js` handle layout and behavior. Tests cover service, adapters and the full integration path
…es with two lightweight profile modals. New ports, service methods, adapters and Flask routes support both updates. Profile UI gains two small modals and minor styling tweaks. Seventeen tests cover the full update flow
…the profile’s password modal. The new password field is wrapped in a `.password-wrapper` with a toggle button, styled in `profile.css` and the existing `password-toggle.js` is now loaded on the profile page
…h clear “e.g.” examples. Replace vague placeholders with concrete samples (e.g., `dev_journey`, `MyP@ssw0rd!`), add the missing one in the profile email modal and apply the same pattern across login registration and profile forms
…ents via SET NULL. Deleted users’ comments stay visible as “Anonymous / Comment removed”. Author IDs become nullable across domain, DTOs and models, and services/templates handle the Anonymous fallback. Migration V11 updates the FK. Routes, views, CSS and adapters are adjusted. Ten new tests cover DTOs, services, Flask adapter and integration
…. Replies are disabled from depth ≥ 3, and DTOs stop returning deeper children. Sorting is unified to newest‑first and nullable author IDs are handled across services and tree building. Tests cover truncation, depth logic and HTML output
…Note article content. Unit test verifies that `prosemirror_to_html` escapes `<script>` inside paragraph text. Integration test confirms the full HTTP pipeline safely renders BlockNote JSON containing an XSS payload
…th and drop the cascade parameter from comment deletion. delete_comment now always cascades descendants through _delete_with_descendants, matching real frontend behavior. Ports, services, adapters, template and tests are updated accordingly
…e promotion/demotion. Backend gains a validated update_account_role flow with new ports, service logic and a POST /admin/users/<id>/role route. Adapters implement update_role, and the profile page plus user list get an inline role selector for admins. CSS updates align the new forms
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.
Contexte
Gestion complète des comptes utilisateurs — modification email/mot de passe, promotion de rôle par l'admin, suppression de compte, et modération des commentaires imbriqués — implémentée via l'architecture hexagonale.
Modifications
Compte utilisateur
password-toggle.js)dev_journey,MyP@ssw0rd!) sur login, inscription et profilAdministration
update_account_roleavec validation (admin requis, cible existante, cible non-admin, rôle valide). Sélecteur inline sur la page profil + tableau des utilisateurs, styles cohérents. 10 nouveaux testsCommentaires
orphan_childrensupprimé, la suppression cascade toujours via_delete_with_descendants()Sécurité
prosemirror_to_htmléchappe<script>) + intégration (pipeline HTTP complet avec payload BlockNote JSON)Refactor
base.html, styles.dialogdéplacés dansbase.css.detail-body,.article-form-actions,.article-form-btn,.comment-reply-input