Files
sure/lib/feature_flags.rb
Juan José Mata 4b0986220f Remove Flipper and replace with ENV-driven FeatureFlags (#957)
* Presence of valid DEFAULT_UI_LAYOUT is sufficient

* Linter
2026-02-10 23:30:45 +01:00

18 lines
389 B
Ruby

# 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