From ee2fffd25b0ad74eda0e55e893e4d9ad70a496d1 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 31 Aug 2025 22:48:41 +0000 Subject: [PATCH] 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. --- app/views/members/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/members/show.html.haml b/app/views/members/show.html.haml index e37d9bd30..d4654b8f8 100644 --- a/app/views/members/show.html.haml +++ b/app/views/members/show.html.haml @@ -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.