20221206124535_issue_4412_setting_saml_logout_url.rb 849 B

123456789101112131415161718192021
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue4412SettingSamlLogoutUrl < ActiveRecord::Migration[6.1]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. saml_setting = Setting.find_by(name: 'auth_saml_credentials')
  7. return if !saml_setting
  8. saml_setting.options[:form].insert(2, {
  9. display: 'IDP Single Logout target URL',
  10. null: true,
  11. name: 'idp_slo_service_url',
  12. tag: 'input',
  13. placeholder: 'https://capriza.github.io/samling/slo.html',
  14. })
  15. saml_setting.save!
  16. end
  17. end