From 9ec25a05ecbcdd2f942b304af67070d2412bf35f Mon Sep 17 00:00:00 2001 From: Floorb <132411956+Neetpone@users.noreply.github.com> Date: Tue, 2 May 2023 20:05:16 -0400 Subject: [PATCH] fix: make it so moderators can delete tag changes too --- 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 21b8ba1a..f31cb5ca 100644 --- a/lib/philomena/users/ability.ex +++ b/lib/philomena/users/ability.ex @@ -130,6 +130,7 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do # Revert tag changes def can?(%User{role: "moderator"}, :revert, TagChange), do: true + def can?(%User{role: "moderator"}, :delete, %TagChange{}), do: true # Manage commissions def can?(%User{role: "moderator"}, _action, %Commission{}), do: true