Ensure communication lists are filtered for approval

This commit is contained in:
Liam 2024-12-15 01:23:35 -05:00
parent 38af26db71
commit cdeb792cbc
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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}"