assistants can now see deleteds in comments/forum search

Fixes #207
This commit is contained in:
Raptorshy 2020-09-26 07:10:15 -07:00 committed by byte[]
parent 1a6c3731e0
commit 18a571e7d1
2 changed files with 2 additions and 3 deletions

View file

@ -50,7 +50,7 @@ defmodule PhilomenaWeb.CommentController do
render(conn, "index.html", title: "Comments", error: msg, comments: [])
end
defp filters(%{role: role}) when role in ["moderator", "admin"], do: []
defp filters(%{role: role}) when role in ["assistant", "moderator", "admin"], do: []
defp filters(_user),
do: [%{term: %{hidden_from_users: false}}]

View file

@ -51,8 +51,7 @@ defmodule PhilomenaWeb.PostController do
defp filters(%{role: "assistant"}) do
[
%{terms: %{access_level: ["normal", "assistant"]}},
%{term: %{deleted: false}}
%{terms: %{access_level: ["normal", "assistant"]}}
]
end