From 090236b15b23115556af92ea047f4826b0a37841 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 8 Mar 2017 13:12:24 +0530 Subject: [PATCH] FIX: do not show about page to anonymous users for private forums --- app/controllers/about_controller.rb | 3 ++- app/views/static/show.html.erb | 4 +++- spec/controllers/about_controller_spec.rb | 26 +++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 spec/controllers/about_controller_spec.rb diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb index 0d53930bcd3..40608cc50d4 100644 --- a/app/controllers/about_controller.rb +++ b/app/controllers/about_controller.rb @@ -5,8 +5,9 @@ class AboutController < ApplicationController before_filter :ensure_logged_in, only: [:live_post_counts] def index - @about = About.new + return redirect_to path('/login') if SiteSetting.login_required? && current_user.nil? + @about = About.new respond_to do |format| format.html do render :index diff --git a/app/views/static/show.html.erb b/app/views/static/show.html.erb index 7716a696451..c941961795e 100644 --- a/app/views/static/show.html.erb +++ b/app/views/static/show.html.erb @@ -1,7 +1,9 @@