vienalatina/apps/board/tests
Claude 0c4a98b0e0
Stop offering a logout button that was never a logout
"Cerrar sesión del todo" linked straight to /user/logout on the account
server. That route is POST-only — verified in Gitea 1.22's router, which
registers m.Post("/logout", auth.SignOut) and no GET at all — so the
click was a GET, the answer was 404, and the session it promised to end
carried on untouched. It shipped in 724dada, in the commit whose message
was about not overstating what Salir does.

It cannot be repaired by turning the link into a form: the POST needs a
CSRF token belonging to that other domain, unreadable from here by
design. So the page stops pretending and gives the instruction — go
there, open the profile menu, choose Cerrar sesión — which is what the
small print underneath already said.

server-setup.md contained the whole answer and contradicted itself: one
paragraph states the logout is POST-only "so a link cannot trigger it",
and two paragraphs later promises "the link that finishes the job". The
code followed the wrong half.

Worse, a test asserted "/user/logout" in page, so the suite was
enforcing the defect rather than catching it. That assertion is now
inverted, and a template guard fails the build if any template links
there again.

199 tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
2026-09-28 15:43:32 +00:00
..
__init__.py Add a members area: roles and an internal board 2026-09-22 10:57:18 +00:00
conftest.py Let members post pictures, and back them up 2026-09-28 09:02:18 +00:00
test_auth.py Stop offering a logout button that was never a logout 2026-09-28 15:43:32 +00:00
test_board.py Add a members area: roles and an internal board 2026-09-22 10:57:18 +00:00
test_content.py Write the site from the members area instead of Decap 2026-09-25 15:07:31 +00:00
test_deployment.py Hand the mail settings to the container, and rebuild on deploy 2026-09-25 18:42:39 +00:00
test_invites.py Give Gitea a deploy path, and invitations a second chance 2026-09-28 15:15:35 +00:00
test_members.py Let members get a password of their own 2026-09-25 17:49:39 +00:00
test_templates.py Stop offering a logout button that was never a logout 2026-09-28 15:43:32 +00:00
test_uploads.py Let members post pictures, and back them up 2026-09-28 09:02:18 +00:00