From c95a00911b11134fdd7ca01cd2f641fc0c624023 Mon Sep 17 00:00:00 2001 From: parasprite Date: Wed, 9 Dec 2020 20:00:17 -0600 Subject: [PATCH] Allow mods to manage galleries (somewhat) (#84) Co-authored-by: Parasprite --- lib/philomena/users/ability.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/philomena/users/ability.ex b/lib/philomena/users/ability.ex index 2e6b3fb2..e03612b1 100644 --- a/lib/philomena/users/ability.ex +++ b/lib/philomena/users/ability.ex @@ -124,6 +124,9 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do # Manage commissions def can?(%User{role: "moderator"}, _action, %Commission{}), do: true + # Manage galleries + def can?(%User{role: "moderator"}, _action, %Gallery{}), do: true + # And some privileged moderators can... # Manage site notices