Skip to content

Commit

Permalink
Drop feature flag check on WatchedItemsController
Browse files Browse the repository at this point in the history
From now on we are always going through this controller, the feature
flag will be removed in coming steps.
  • Loading branch information
saraycp committed Nov 30, 2022
1 parent 700cc0e commit efb9f85
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/api/app/controllers/webui/watched_items_controller.rb
@@ -1,6 +1,5 @@
class Webui::WatchedItemsController < Webui::WebuiController
before_action :require_login
before_action :check_user_belongs_feature_flag
before_action :set_watchable
before_action :set_current_object

Expand Down Expand Up @@ -54,11 +53,4 @@ def set_current_object

@current_object = @watchable if @current_object.nil?
end

def check_user_belongs_feature_flag
return if Flipper.enabled?(:new_watchlist, User.session)

flash[:error] = 'This page is not accessible unless you enabled the "New watchlist" beta feature in the beta program.'
redirect_back(fallback_location: root_path)
end
end

0 comments on commit efb9f85

Please sign in to comment.