From af9b9777af9601bb2de857e6e4fea0b07d699108 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 27 Oct 2019 14:02:05 -0500 Subject: add profile option to (locally) block anonymous views of public posts --- app/controllers/statuses_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers/statuses_controller.rb') diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb index bb6f0fd8c..d082d514d 100644 --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -201,6 +201,8 @@ class StatusesController < ApplicationController if @status.sharekey.present? && @sharekey == @status.sharekey skip_authorization + elsif @account.block_anon && !user_signed_in? + raise ActiveRecord::RecordNotFound else authorize @status, :show? end -- cgit