# Idempotent: sign-in goes only through Dex (discourse-openid-connect), # and the Sign Up button goes to the eom.dev membership site. # Run with: RAILS_ENV=production bundle exec rails runner SIGNUP_URL = "https://www.eom.dev/members" # OIDC is the only login method left, so with auth_immediately the # Log In button redirects straight to Dex. Accounts link by email. SiteSetting.ldap_enabled = false SiteSetting.enable_local_logins = false SiteSetting.auth_immediately = true # New members sign up at www.eom.dev; Discourse must still create their # account on first Dex login. SiteSetting.allow_new_registrations = true head_tag = <<~HTML HTML name = "eom.dev sign-up redirect" component = Theme.find_by(name: name) || Theme.create!(name: name, user_id: Discourse.system_user.id, component: true) component.set_field(target: :common, name: :head_tag, value: head_tag) component.save! Theme.where(component: false).find_each do |theme| next if theme.child_themes.include?(component) theme.add_relative_theme!(:child, component) end puts "ldap_enabled=#{SiteSetting.ldap_enabled} component=#{component.id} " \ "parents=#{component.parent_themes.pluck(:name).join(', ')}"