From cdeb792cbca4958a46249df051bb68756c2a2e63 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 15 Dec 2024 01:23:35 -0500 Subject: [PATCH] Ensure communication lists are filtered for approval --- lib/philomena_web/templates/comment/index.html.slime | 2 +- lib/philomena_web/templates/post/index.html.slime | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/philomena_web/templates/comment/index.html.slime b/lib/philomena_web/templates/comment/index.html.slime index ae3e2eb0..4fe78810 100644 --- a/lib/philomena_web/templates/comment/index.html.slime +++ b/lib/philomena_web/templates/comment/index.html.slime @@ -17,7 +17,7 @@ h2 Search Results - route = fn p -> ~p"/comments?#{p}" end - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @comments, route: route, params: [cq: @conn.params["cq"]], conn: @conn - = for {body, comment} <- @comments, comment.image.hidden_from_users == false do + = for {body, comment} <- @comments, comment.image.hidden_from_users == false and can_view_communication?(@conn, comment) do = render PhilomenaWeb.CommentView, "_comment_with_image.html", body: body, comment: comment, conn: @conn .block diff --git a/lib/philomena_web/templates/post/index.html.slime b/lib/philomena_web/templates/post/index.html.slime index 6313a9dc..d95e76b0 100644 --- a/lib/philomena_web/templates/post/index.html.slime +++ b/lib/philomena_web/templates/post/index.html.slime @@ -17,7 +17,7 @@ h2 Search Results - route = fn p -> ~p"/posts?#{p}" end - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @posts, route: route, params: [pq: @conn.params["pq"]], conn: @conn - = for {body, post} <- @posts, post.topic.hidden_from_users == false do + = for {body, post} <- @posts, post.topic.hidden_from_users == false and can_view_communication?(@conn, post) do div h3 =<> link post.topic.forum.name, to: ~p"/forums/#{post.topic.forum}"