Skip to content

Conversation

@czc0407
Copy link

@czc0407 czc0407 commented Oct 23, 2025

Summary

Fixes #2766 — Clicking the PSF membership link previously led to /users/membership/edit/,
causing a 404 for unauthenticated users. This PR updates the link rendering logic and adds tests.

Changes

  • Updated templates/includes/authenticated.html to dynamically choose:
    • /users/membership/ for non-members
    • /users/membership/edit/ for existing members
  • Added new test file: users/tests/test_membership_links.py

Testing

Run:

python3 manage.py test users.tests.test_membership_links

All tests passed ✅

Impact

This fix ensures the membership link works for both logged-in and anonymous users.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some wording suggestions.

czc0407 and others added 5 commits October 23, 2025 19:39
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@czc0407 czc0407 force-pushed the fix-psfmember-link branch from 3504be8 to df18302 Compare October 23, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: psfmember.org links to /user/membership/edit/ which is 404 for new users

2 participants