Skip to content

Commit

Permalink
add code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
madhums committed Jun 24, 2023
1 parent 661975a commit 7ab7452
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/policies/discussion_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def permitted_attributes
%i[title description]
end

# We let everyone see discussions if they are logged in.
# Even for an admin this is true.
def index?
!!user
end
Expand Down

0 comments on commit 7ab7452

Please sign in to comment.