diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-01-06 14:55:47 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-04-28 09:07:16 +0100 |
commit | f71658e9223f954177a5cacb8c7ad43605c264cd (patch) | |
tree | 2f8841418c7db9ff9535920d5ea7515200c9bb7a /app/controllers/widgets_controller.rb | |
parent | 203d35713262ecfec4dfd44c3b080edcd3760750 (diff) |
Don't show the widget pages for requests without normal prominence.
Diffstat (limited to 'app/controllers/widgets_controller.rb')
-rw-r--r-- | app/controllers/widgets_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
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 |