20240819100430_auth_third_party_no_create_user.rb 1001 B

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class AuthThirdPartyNoCreateUser < ActiveRecord::Migration[5.0]
  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: 'No user creation on logon',
  8. name: 'auth_third_party_no_create_user',
  9. area: 'Security::ThirdPartyAuthentication',
  10. description: 'Disables user creation on logon vwith a third-party application.',
  11. options: {
  12. form: [
  13. {
  14. display: '',
  15. null: true,
  16. name: 'auth_third_party_no_create_user',
  17. tag: 'boolean',
  18. options: {
  19. true => 'yes',
  20. false => 'no',
  21. },
  22. },
  23. ],
  24. },
  25. preferences: {
  26. permission: ['admin.security'],
  27. prio: 20,
  28. },
  29. state: false,
  30. frontend: false
  31. )
  32. end
  33. end