mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +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
|
@ -68,12 +68,12 @@ defmodule PhilomenaWeb.ImageLoader do
|
|||
|
||||
# Allow moderators to index hidden images
|
||||
|
||||
defp maybe_show_deleted(filters, _show_hidden?, "1"),
|
||||
do: filters
|
||||
|
||||
defp maybe_show_deleted(filters, false, _param),
|
||||
do: [%{term: %{hidden_from_users: true}} | filters]
|
||||
|
||||
defp maybe_show_deleted(filters, true, "1"),
|
||||
do: filters
|
||||
|
||||
defp maybe_show_deleted(filters, true, "only"),
|
||||
do: [%{term: %{hidden_from_users: false}} | filters]
|
||||
|
||||
|
|
Loading…
Reference in a new issue