this check seems redundant

This commit is contained in:
Luna D 2020-03-03 15:38:59 -05:00
parent bd768088c2
commit 67ac0318f7
No known key found for this signature in database
GPG key ID: D0F46C94720BAA4B

View file

@ -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