20170714000002_user_email_multiple_use.rb 909 B

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class UserEmailMultipleUse < 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: 'User email for muliple users',
  8. name: 'user_email_multiple_use',
  9. area: 'Model::User',
  10. description: 'Allow to use email address for muliple users.',
  11. options: {
  12. form: [
  13. {
  14. display: '',
  15. null: true,
  16. name: 'user_email_multiple_use',
  17. tag: 'boolean',
  18. options: {
  19. true => 'yes',
  20. false => 'no',
  21. },
  22. },
  23. ],
  24. },
  25. state: false,
  26. preferences: {
  27. permission: ['admin'],
  28. },
  29. frontend: false
  30. )
  31. end
  32. end