Remove Flipper and replace with ENV-driven FeatureFlags (#957)

* Presence of valid DEFAULT_UI_LAYOUT is sufficient

* Linter
This commit is contained in:
Juan José Mata
2026-02-10 23:30:45 +01:00
committed by GitHub
parent 19aeac3a84
commit 4b0986220f
10 changed files with 45 additions and 97 deletions

17
lib/feature_flags.rb Normal file
View File

@@ -0,0 +1,17 @@
# frozen_string_literal: true
module FeatureFlags
class << self
def db_sso_providers?
auth_source = ENV.fetch("AUTH_PROVIDERS_SOURCE") do
Rails.configuration.app_mode.self_hosted? ? "db" : "yaml"
end
auth_source.to_s.downcase == "db"
end
def intro_ui?
Rails.configuration.x.ui.default_layout.to_s.in?(%w[intro dashboard])
end
end
end