Allows assistants to update tags on deleted images (#58)

Co-authored-by: Raptorshy <raptorshy@gmail.com>
This commit is contained in:
parasprite 2020-10-24 17:01:33 -07:00 committed by GitHub
parent c6e0110f72
commit cd91fd8c9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -177,6 +177,9 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do
def can?(%User{role: "assistant", role_map: %{"Image" => "moderator"}}, :edit, %Image{}), def can?(%User{role: "assistant", role_map: %{"Image" => "moderator"}}, :edit, %Image{}),
do: true do: true
def can?(%User{role: "assistant", role_map: %{"Image" => "moderator"}}, :edit_metadata, %Image{}),
do: true
def can?( def can?(
%User{role: "assistant", role_map: %{"Image" => "moderator"}}, %User{role: "assistant", role_map: %{"Image" => "moderator"}},
:edit_description, :edit_description,