fixes #103: allow moderators to edit and create posts in locked topics

This commit is contained in:
byte[] 2020-04-30 00:24:13 -04:00
parent 0b8cad77dd
commit d2c9975870

View file

@ -100,6 +100,7 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do
# Hide topics # Hide topics
def can?(%User{role: "moderator"}, :show, %Topic{}), do: true def can?(%User{role: "moderator"}, :show, %Topic{}), do: true
def can?(%User{role: "moderator"}, :hide, %Topic{}), do: true def can?(%User{role: "moderator"}, :hide, %Topic{}), do: true
def can?(%User{role: "moderator"}, :create_post, %Topic{}), do: true
# Edit tags # Edit tags
def can?(%User{role: "moderator"}, :edit, %Tag{}), do: true def can?(%User{role: "moderator"}, :edit, %Tag{}), do: true