fix inability to delete comment contents

This commit is contained in:
byte[] 2020-01-03 14:36:57 -05:00
parent e5549cf8ed
commit 47fcec86ea

View file

@ -82,8 +82,10 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do
# Edit posts and comments
def can?(%User{role: "moderator"}, :edit, %Post{}), do: true
def can?(%User{role: "moderator"}, :hide, %Post{}), do: true
def can?(%User{role: "moderator"}, :delete, %Post{}), do: true
def can?(%User{role: "moderator"}, :edit, %Comment{}), do: true
def can?(%User{role: "moderator"}, :hide, %Comment{}), do: true
def can?(%User{role: "moderator"}, :delete, %Comment{}), do: true
# Show the DNP list
def can?(%User{role: "moderator"}, _action, DnpEntry), do: true