Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/whats_new_controller.rb')
-rw-r--r--app/controllers/whats_new_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/whats_new_controller.rb b/app/controllers/whats_new_controller.rb
index e24b0bbc7bb..6f389aa4924 100644
--- a/app/controllers/whats_new_controller.rb
+++ b/app/controllers/whats_new_controller.rb
@@ -5,6 +5,7 @@ class WhatsNewController < ApplicationController
skip_before_action :authenticate_user!
+ before_action :check_whats_new_enabled
before_action :check_valid_page_param, :set_pagination_headers
feature_category :navigation
@@ -19,6 +20,10 @@ class WhatsNewController < ApplicationController
private
+ def check_whats_new_enabled
+ render_404 if Gitlab::CurrentSettings.current_application_settings.whats_new_variant_disabled?
+ end
+
def check_valid_page_param
render_404 if current_page < 1
end