mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +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
|
||||
|
||||
# View forums
|
||||
def can?(%User{role: "moderator"}, :show, %Forum{access_level: level})
|
||||
when level in ["normal", "assistant", "staff"],
|
||||
do: true
|
||||
def can?(%User{role: "moderator"}, :show, %Forum{}), do: true
|
||||
|
||||
def can?(%User{role: "moderator"}, :show, %Topic{hidden_from_users: true}), do: true
|
||||
|
||||
|
|
Loading…
Reference in a new issue