Skip to content

Commit

Permalink
hide public docs from blocked users
Browse files Browse the repository at this point in the history
  • Loading branch information
drusepth committed Mar 27, 2024
1 parent 8df3f9b commit cfce459
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/documents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ def show
return redirect_to(root_path, notice: "That document either doesn't exist or you don't have permission to view it.")
end

if @document.user.thredded_user_detail.moderation_state == "blocked"
return redirect_to(root_path, notice: "That document either doesn't exist or you don't have permission to view it.")
end

# Put the focus on the document by removing Notebook.ai actions
@navbar_actions = []
end
Expand Down

0 comments on commit cfce459

Please sign in to comment.