mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Remove Flipper and replace with ENV-driven FeatureFlags (#957)
* Presence of valid DEFAULT_UI_LAYOUT is sufficient * Linter
This commit is contained in:
17
lib/feature_flags.rb
Normal file
17
lib/feature_flags.rb
Normal 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
|
||||
Reference in New Issue
Block a user