user.rb 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. Zammad::Application.routes.draw do
  3. api_path = Rails.configuration.api_path
  4. # two-factor
  5. match api_path + '/users/:id/two_factor_remove_authentication_method', to: 'user/two_factors#two_factor_remove_authentication_method', via: :delete
  6. match api_path + '/users/:id/two_factor_remove_all_authentication_methods', to: 'user/two_factors#two_factor_remove_all_authentication_methods', via: :delete
  7. match api_path + '/users/:id/two_factor_enabled_authentication_methods', to: 'user/two_factors#two_factor_enabled_authentication_methods', via: :get
  8. match api_path + '/users/two_factor_personal_configuration', to: 'user/two_factors#two_factor_personal_configuration', via: :get
  9. match api_path + '/users/two_factor_authentication_method_initiate_configuration/:method', to: 'user/two_factors#two_factor_authentication_method_initiate_configuration', via: :get
  10. match api_path + '/users/two_factor_authentication_method_configuration/:method', to: 'user/two_factors#two_factor_authentication_method_configuration', via: :get
  11. match api_path + '/users/two_factor_authentication_remove_credentials/:method', to: 'user/two_factors#two_factor_authentication_remove_credentials', via: :delete
  12. match api_path + '/users/two_factor_verify_configuration', to: 'user/two_factors#two_factor_verify_configuration', via: :post
  13. match api_path + '/users/two_factor_default_authentication_method', to: 'user/two_factors#two_factor_default_authentication_method', via: :post
  14. match api_path + '/users/two_factor_recovery_codes_generate', to: 'user/two_factors#two_factor_recovery_codes_generate', via: :post
  15. # users
  16. match api_path + '/users/search', to: 'users#search', via: %i[get post option]
  17. match api_path + '/users/password_reset', to: 'users#password_reset_send', via: :post
  18. match api_path + '/users/password_reset_verify', to: 'users#password_reset_verify', via: :post
  19. match api_path + '/users/password_change', to: 'users#password_change', via: :post
  20. match api_path + '/users/password_check', to: 'users#password_check', via: :post
  21. match api_path + '/users/preferences', to: 'users#preferences', via: :put
  22. match api_path + '/users/preferences_notifications_reset', to: 'users#preferences_notifications_reset', via: :post
  23. match api_path + '/users/out_of_office', to: 'users#out_of_office', via: :put
  24. match api_path + '/users/account', to: 'users#account_remove', via: :delete
  25. match api_path + '/users/import_example', to: 'users#import_example', via: :get
  26. match api_path + '/users/import', to: 'users#import_start', via: :post
  27. match api_path + '/users/avatar', to: 'users#avatar_new', via: :post
  28. match api_path + '/users/avatar', to: 'users#avatar_list', via: :get
  29. match api_path + '/users/avatar', to: 'users#avatar_destroy', via: :delete
  30. match api_path + '/users/avatar/set', to: 'users#avatar_set_default', via: :post
  31. match api_path + '/users/me', to: 'users#me', via: :get
  32. match api_path + '/users/after_auth', to: 'user/after_auth#show', via: :get
  33. match api_path + '/users', to: 'users#index', via: :get
  34. match api_path + '/users/:id', to: 'users#show', via: :get
  35. match api_path + '/users/history/:id', to: 'users#history', via: :get
  36. match api_path + '/users', to: 'users#create', via: :post
  37. match api_path + '/users/:id', to: 'users#update', via: :put, as: 'api_v1_update_user'
  38. match api_path + '/users/:id', to: 'users#destroy', via: :delete, as: 'api_v1_delete_user'
  39. match api_path + '/users/image/:hash', to: 'users#image', via: :get
  40. match api_path + '/users/unlock/:id', to: 'users#unlock', via: :put
  41. match api_path + '/users/email_verify', to: 'users#email_verify', via: :post
  42. match api_path + '/users/email_verify_send', to: 'users#email_verify_send', via: :post
  43. match api_path + '/users/admin_password_auth', to: 'users#admin_password_auth_send', via: :post
  44. match api_path + '/users/admin_password_auth_verify', to: 'users#admin_password_auth_verify', via: :post
  45. end