Don't require ?del on duplicate images for mods

This commit is contained in:
mdashlw 2025-02-11 10:06:48 +00:00
parent 9b2c7dc8b8
commit 7fefbf884d

View file

@ -202,8 +202,9 @@ defmodule PhilomenaWeb.ImageController do
PhilomenaWeb.NotFoundPlug.call(conn)
not is_nil(image.duplicate_id) and
(not Canada.Can.can?(conn.assigns.current_user, :show, image) or
conn.params["del"] == nil) ->
(not Canada.Can.can?(conn.assigns.current_user, :show, image) or
conn.params["del"] == nil) and
not Canada.Can.can?(conn.assigns.current_user, :hide, image) ->
conn
|> put_flash(
:info,