Working signout button

This commit is contained in:
Olaf
2026-08-24 19:56:28 +02:00
parent 28a01175f7
commit 12f3580f60
17 changed files with 252 additions and 10 deletions
+24
View File
@@ -271,3 +271,27 @@ Render edit action for owned links
### Assistant outcome
Verified that the feed renders the Edit button only when `is_owner` is true, while the backend owner check remains enforced by `PUT /api/links/{link_id}`. The live Docker-served feed asset contains the owner-gated action, focused tests passed, and the full strict suite passed with 12 tests.
### User
On every page, when a user has authenticated show its avatar and name in the header next to a sign out putton.
### Assistant outcome
Added a shared authenticated header to the feed, login, admin, and profile pages. The shared script validates the stored token through `/api/auth/me`, displays the user's avatar and username beside `Sign out`, and shows `Sign in` when signed out. Uploaded avatars are used with an initial fallback. All pages include the shared header, the strict backend suite passed with 12 tests, and all browser scripts passed syntax checks.
### User
execute next todo
### Assistant outcome
Implemented the next unfinished requirements slice: authenticated password changes from the profile page. Added current-password verification, an 8-character minimum for new passwords, profile form controls, regression coverage, and README documentation. The strict backend suite passed with 12 tests.
### User
execute final todo (nummer 3)
### Assistant outcome
Completed the third remaining plan item by hardening Docker and Traefik: added non-root application execution, configurable health checks, health-gated Traefik startup, loopback dashboard binding, and a startup entrypoint that repairs ownership on existing SQLite volumes before dropping to UID 10001. Compose validation, a fresh image build, existing-volume startup, application health, and the strict backend suite all passed.
### User
Pressing signout (on the home page) does not log the user out
### Assistant outcome
Found that the home page rendered the shared authenticated session header but did not load `logout.js`, so its sign-out button had no event handler. Added the logout handler to the home and login pages with cache-busted asset references. Verified real token revocation and the full strict backend suite with 12 passing tests.
+4
View File
@@ -48,6 +48,10 @@
44. Add authenticated link editing
45. Expose ownership if feed data
46. Render edit action for owned links
47. On every page, when a user has authenticated show its avatar and name in the header next to a sign out putton.
48. execute next todo
49. execute final todo (nummer 3)
50. Pressing signout (on the home page) does not log the user out
## Future entries