mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-04-20 10:13:59 +02:00
Don't require ?del on duplicate images for mods
This commit is contained in:
parent
9b2c7dc8b8
commit
7fefbf884d
1 changed files with 3 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue