diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index a04aa2fa5..78f2a06d3 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -53,7 +53,7 @@ <%= summary_list.with_row do |row| row.with_key { "Telephone number" } row.with_value { user_details_html(@user, current_user, "phone") } - if UserPolicy.new(current_user, @user).edit_telephone_numbers? + if UserPolicy.new(current_user, @user).edit_telephone_numbers? && @user.phone.present? row.with_action( text: user_action_text(@user, "phone"), visually_hidden_text: "telephone number", @@ -96,7 +96,7 @@ <%= summary_list.with_row do |row| row.with_key { "Role" } row.with_value { user_details_html(@user, current_user, "role") } - if UserPolicy.new(current_user, @user).edit_roles? + if UserPolicy.new(current_user, @user).edit_roles? && @user.role row.with_action( text: user_action_text(@user, "role"), visually_hidden_text: "role",