20170126091128_application_secret_setting.rb 611 B

12345678910111213141516171819202122
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. class ApplicationSecretSetting < ActiveRecord::Migration[4.2]
  3. def up
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. Setting.create_if_not_exists(
  7. title: 'Application secret',
  8. name: 'application_secret',
  9. area: 'Core',
  10. description: 'Defines the random application secret.',
  11. options: {},
  12. state: SecureRandom.hex(128),
  13. preferences: {
  14. permission: ['admin'],
  15. },
  16. frontend: false
  17. )
  18. end
  19. end