fix: make it so moderators can delete tag changes too

This commit is contained in:
Floorb 2023-05-02 20:05:16 -04:00
parent fe8395da99
commit 9ec25a05ec

View file

@ -130,6 +130,7 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do
# Revert tag changes # Revert tag changes
def can?(%User{role: "moderator"}, :revert, TagChange), do: true def can?(%User{role: "moderator"}, :revert, TagChange), do: true
def can?(%User{role: "moderator"}, :delete, %TagChange{}), do: true
# Manage commissions # Manage commissions
def can?(%User{role: "moderator"}, _action, %Commission{}), do: true def can?(%User{role: "moderator"}, _action, %Commission{}), do: true