mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-01 03:46:44 +01:00
fixes #103: allow moderators to edit and create posts in locked topics
This commit is contained in:
parent
0b8cad77dd
commit
d2c9975870
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue