Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unconfirmed email profile should return 404 #5143

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kinsomicrote
Copy link

It is possible to view the profile page of a user whose email has not been confirmed. To resolve #5079, this PR returns a 404 error page for the profile page when the email has not been confirmed.

@kinsomicrote
Copy link
Author

cc @martinemde

Copy link
Member

@martinemde martinemde left a comment

Choose a reason for hiding this comment

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

This looks good! Thank you for including a test. I think if you swap the code to use our utility method, the test should still pass and we can merge this. Thank you!

app/controllers/profiles_controller.rb Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.21%. Comparing base (afc7367) to head (4356fc8).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5143      +/-   ##
==========================================
- Coverage   96.05%   93.21%   -2.85%     
==========================================
  Files         429      429              
  Lines        9106     9167      +61     
==========================================
- Hits         8747     8545     -202     
- Misses        359      622     +263     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@segiddins segiddins left a comment

Choose a reason for hiding this comment

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

Thanks! Don't worry about the test failures, I will get those'd fixed

kinsomicrote and others added 3 commits November 14, 2024 11:26
- Added a check for profiles whose email has not been confirmed, so the
show page can return 404 for such profiles
Use confirmed scope for finding user by slug so there is no need
checking the user record directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Profiles for unconfirmed users should 404
3 participants