mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
fix inability to delete comment contents
This commit is contained in:
parent
e5549cf8ed
commit
47fcec86ea
1 changed files with 2 additions and 0 deletions
|
@ -82,8 +82,10 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do
|
||||||
# Edit posts and comments
|
# Edit posts and comments
|
||||||
def can?(%User{role: "moderator"}, :edit, %Post{}), do: true
|
def can?(%User{role: "moderator"}, :edit, %Post{}), do: true
|
||||||
def can?(%User{role: "moderator"}, :hide, %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"}, :edit, %Comment{}), do: true
|
||||||
def can?(%User{role: "moderator"}, :hide, %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
|
# Show the DNP list
|
||||||
def can?(%User{role: "moderator"}, _action, DnpEntry), do: true
|
def can?(%User{role: "moderator"}, _action, DnpEntry), do: true
|
||||||
|
|
Loading…
Reference in a new issue