From 31e77276481e604e7fcca9c7e6872eb3972df466 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Fri, 20 Dec 2019 17:30:31 -0500 Subject: [PATCH] allow assistants to moderate images --- lib/philomena/users/ability.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/philomena/users/ability.ex b/lib/philomena/users/ability.ex index bc62771a..f5f4babd 100644 --- a/lib/philomena/users/ability.ex +++ b/lib/philomena/users/ability.ex @@ -151,6 +151,7 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do def can?(%User{role: "assistant", role_map: %{"Image" => "moderator"}}, :show, %Image{}), do: true def can?(%User{role: "assistant", role_map: %{"Image" => "moderator"}}, :hide, %Image{}), do: true def can?(%User{role: "assistant", role_map: %{"Image" => "moderator"}}, :edit, %Image{}), do: true + def can?(%User{role: "assistant", role_map: %{"Image" => "moderator"}}, :edit_description, %Image{}), do: true # Dupe assistant actions def can?(%User{role: "assistant", role_map: %{"DuplicateReport" => "moderator"}}, :index, DuplicateReport), do: true