20170714000002_user_email_multiple_use.rb 832 B

12345678910111213141516171819202122232425262728293031323334
  1. class UserEmailMultipleUse < ActiveRecord::Migration[4.2]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. Setting.create_if_not_exists(
  6. title: 'User email for muliple users',
  7. name: 'user_email_multiple_use',
  8. area: 'Model::User',
  9. description: 'Allow to use email address for muliple users.',
  10. options: {
  11. form: [
  12. {
  13. display: '',
  14. null: true,
  15. name: 'user_email_multiple_use',
  16. tag: 'boolean',
  17. options: {
  18. true => 'yes',
  19. false => 'no',
  20. },
  21. },
  22. ],
  23. },
  24. state: false,
  25. preferences: {
  26. permission: ['admin'],
  27. },
  28. frontend: false
  29. )
  30. end
  31. end