add_internal.rb 426 B

1234567891011
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class Service::User::AddInternal < Service::BaseWithCurrentUser
  3. include Service::Concerns::HandlesCoreWorkflow
  4. def execute(user_data:)
  5. Service::User::FilterPermissionAssignments.new(current_user: current_user).execute(user_data: user_data)
  6. set_core_workflow_information(user_data, ::User)
  7. User.new(user_data).tap(&:save!)
  8. end
  9. end