summaryrefslogtreecommitdiff
path: root/app/controllers/whats_new_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/whats_new_controller.rb')
-rw-r--r--app/controllers/whats_new_controller.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/controllers/whats_new_controller.rb b/app/controllers/whats_new_controller.rb
new file mode 100644
index 00000000000..7156faa4e49
--- /dev/null
+++ b/app/controllers/whats_new_controller.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class WhatsNewController < ApplicationController
+ include Gitlab::WhatsNew
+
+ skip_before_action :authenticate_user!
+
+ before_action :check_feature_flag
+
+ feature_category :navigation
+
+ def index
+ respond_to do |format|
+ format.js do
+ render json: whats_new_most_recent_release_items
+ end
+ end
+ end
+
+ private
+
+ def check_feature_flag
+ render_404 unless Feature.enabled?(:whats_new_drawer, current_user)
+ end
+end