From f71658e9223f954177a5cacb8c7ad43605c264cd Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Tue, 6 Jan 2015 14:55:47 +0000 Subject: Don't show the widget pages for requests without normal prominence. --- app/controllers/widgets_controller.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/controllers/widgets_controller.rb') diff --git a/app/controllers/widgets_controller.rb b/app/controllers/widgets_controller.rb index a529e591b..56b80d337 100644 --- a/app/controllers/widgets_controller.rb +++ b/app/controllers/widgets_controller.rb @@ -8,7 +8,7 @@ require 'securerandom' class WidgetsController < ApplicationController - before_filter :check_widget_config, :find_info_request + before_filter :check_widget_config, :find_info_request, :check_prominence skip_before_filter :set_x_frame_options_header, :only => [:show] def show @@ -47,4 +47,10 @@ class WidgetsController < ApplicationController end end + def check_prominence + unless @info_request.prominence == 'normal' + render :nothing => true, :status => :forbidden + end + end + end -- cgit v1.2.3