mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-17 11:04:22 +01:00
Fix to allow users to include deleted images again (#22)
This used to be allowed in the old searching with the `deleted` param for all users. This should correctly add back the ability (using the new `del` param) to specify `del=1` for any user/API search, but correctly block them from doing the more specialized "staff only" searching.
This commit is contained in:
parent
3315c60789
commit
feefc2e5a7
1 changed files with 3 additions and 3 deletions
|
@ -67,13 +67,13 @@ defmodule PhilomenaWeb.ImageLoader do
|
||||||
end
|
end
|
||||||
|
|
||||||
# Allow moderators to index hidden images
|
# Allow moderators to index hidden images
|
||||||
|
|
||||||
|
defp maybe_show_deleted(filters, _show_hidden?, "1"),
|
||||||
|
do: filters
|
||||||
|
|
||||||
defp maybe_show_deleted(filters, false, _param),
|
defp maybe_show_deleted(filters, false, _param),
|
||||||
do: [%{term: %{hidden_from_users: true}} | filters]
|
do: [%{term: %{hidden_from_users: true}} | filters]
|
||||||
|
|
||||||
defp maybe_show_deleted(filters, true, "1"),
|
|
||||||
do: filters
|
|
||||||
|
|
||||||
defp maybe_show_deleted(filters, true, "only"),
|
defp maybe_show_deleted(filters, true, "only"),
|
||||||
do: [%{term: %{hidden_from_users: false}} | filters]
|
do: [%{term: %{hidden_from_users: false}} | filters]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue