mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
this check seems redundant
This commit is contained in:
parent
bd768088c2
commit
67ac0318f7
1 changed files with 1 additions and 3 deletions
|
@ -51,9 +51,7 @@ defimpl Canada.Can, for: [Atom, Philomena.Users.User] do
|
||||||
def can?(%User{role: "moderator"}, :show, %Comment{}), do: true
|
def can?(%User{role: "moderator"}, :show, %Comment{}), do: true
|
||||||
|
|
||||||
# View forums
|
# View forums
|
||||||
def can?(%User{role: "moderator"}, :show, %Forum{access_level: level})
|
def can?(%User{role: "moderator"}, :show, %Forum{}), do: true
|
||||||
when level in ["normal", "assistant", "staff"],
|
|
||||||
do: true
|
|
||||||
|
|
||||||
def can?(%User{role: "moderator"}, :show, %Topic{hidden_from_users: true}), do: true
|
def can?(%User{role: "moderator"}, :show, %Topic{hidden_from_users: true}), do: true
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue