Fix: Only show 'add a bio' link on own profile

The 'add a bio' link on the member profile page was previously shown
based on the `can? :edit, @member` ability check. This caused an issue
for admins, who could see the link on other users' profiles, but the
link would incorrectly lead to their own settings page.

This change modifies the condition to be `member_signed_in? && current_member == @member`.
This ensures the link is only displayed when a logged-in user is
viewing their own profile, which is the correct and intended behavior.
This commit is contained in:
google-labs-jules[bot]
2025-08-31 22:48:41 +00:00
parent c92b912b28
commit ee2fffd25b

View File

@@ -28,7 +28,7 @@
%a{href: "#content"}
Skip to main content
- if @member.bio.blank?
- if can? :edit, @member
- if member_signed_in? && current_member == @member
= link_to "Add a bio to complete your profile.", edit_member_registration_path
- else
#{@member.login_name} hasn't written a bio yet.