Skip to content

Commit

Permalink
Ensure communication lists are filtered for approval
Browse files Browse the repository at this point in the history
  • Loading branch information
liamwhite committed Dec 15, 2024
1 parent 38af26d commit cdeb792
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/philomena_web/templates/comment/index.html.slime
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/philomena_web/templates/post/index.html.slime
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit cdeb792

Please sign in to comment.